System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| # coding: utf-8 | |
| import functools | |
| import time | |
| from threading import local | |
| from collections import deque | |
| class ATFieldException(Exception): | |
| pass |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| # -*- coding: utf-8 -*- | |
| """ | |
| * 关于坚果云的 Webdav 的配置可以参看: https://griddiary.uservoice.com/knowledgebase/articles/478287-%E5%9D%9A%E6%9E%9C%E4%BA%91-webdav-%E8%AE%BE%E7%BD%AE%E6%95%99%E7%A8%8B | |
| * 使用前请先安装 `easywebdav` : ``pip install easywebdav`` | |
| 坚果云 Webdav | |
| ============ | |
| 假设有下面的坚果云目录结构 |
| #!/bin/sh | |
| # Copyright 2012 The Go Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style | |
| # license that can be found in the LICENSE file. | |
| # git goimports pre-commit hook | |
| # | |
| # To use, store as .git/hooks/pre-commit inside your repository and make sure | |
| # it has execute permissions. | |
| # |
| # <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
| # |<---- Using a Maximum Of 50 Characters ---->| | |
| # Explain why this change is being made | |
| # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
| # Provide links or keys to any relevant tickets, articles or other resources | |
| # Example: Github issue #23 |
| package example_test | |
| import ( | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "hex" | |
| "io" | |
| ) | |
| // AES-GCM should be used because the operation is an authenticated encryption |
使用公钥私钥来登陆而不是账号密码,公钥私钥需要简单的在本地生成一下。Github 的生成 SSH 公钥私钥的教程:Generating SSH keys
可能需要使用 -i 参数选择一下本地的私钥,一个示例的 ssh 连接如下:
| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |
| #!/usr/bin/env python3 | |
| from itertools import accumulate | |
| from bisect import bisect | |
| from random import randrange | |
| from unicodedata import name as unicode_name | |
| # Set the unicode version. | |
| # Your system may not support Unicode 7.0 charecters just yet! So hipster. | |
| UNICODE_VERSION = 6 |