Skip to content

Instantly share code, notes, and snippets.

View binderclip's full-sized avatar

clip binderclip

  • Beijing
View GitHub Profile
cadl /
Created May 24, 2018 06:30
# coding: utf-8
import functools
import time
from threading import local
from collections import deque
class ATFieldException(Exception):
nikhita /
Last active July 19, 2024 17:55
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

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:

Kxrr /
Last active January 18, 2022 08:40
Webdev example for Jianguoyun
# -*- coding: utf-8 -*-
* 关于坚果云的 Webdav 的配置可以参看:
* 使用前请先安装 `easywebdav` : ``pip install easywebdav``
坚果云 Webdav
TheHippo / pre-commit
Last active May 6, 2020 16:48
`goimports` pre-commit hook
# 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.
adeekshith / .git-commit-template.txt
Last active July 15, 2024 16:40 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
# <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
kkirsche / aes256-gcm.go
Last active February 23, 2024 14:56
AES-256 GCM Encryption Example in Golang
package example_test
import (
// AES-GCM should be used because the operation is an authenticated encryption
binderclip /
Last active March 22, 2023 09:17
Flask Gunicorn Supervisor Nginx 项目部署小总结

Flask Gunicorn Supervisor Nginx 项目部署小总结


SSH 连接

使用公钥私钥来登陆而不是账号密码,公钥私钥需要简单的在本地生成一下。Github 的生成 SSH 公钥私钥的教程:Generating SSH keys

可能需要使用 -i 参数选择一下本地的私钥,一个示例的 ssh 连接如下:

git config --global https.proxy
git config --global https.proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
denilsonsa / Python Virtual Environments on Debian and
Last active December 1, 2016 06:25
Python Virtual Environments on Debian and Ubuntu

pyvenv-3.3 (Ubuntu 13.10, also Debian)


pyvenv-3.3 venvdir
venvdir/bin/python -c 'import sys; print(sys.path)'
# This should print the venvdir in sys.path.

But in buggy Ubuntu/Debian, it doesn't.

shello /
Last active October 5, 2023 09:16
Random Emoji! (for Python 3)
#!/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.