Skip to content

Instantly share code, notes, and snippets.

Avatar

Shengzhi.Chen chenshengzhi

  • Xiamen, Fujian, China
View GitHub Profile
@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active Jun 27, 2020
git ssh 代理设置
View git_ssh_proxy.md

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@chenshengzhi
chenshengzhi / github_custom_hotkey_settings.json
Last active Jan 28, 2019
GitHub Custom Hotkey Settings
View github_custom_hotkey_settings.json
{
"all": [
{ "f1": "#hotkey-settings" }
],
"{repo}": [
{ "z b y": "{repo}/branches/yours" },
{ "z b a": "{repo}/branches" },
{ "z r": "{repo}/releases" },
{ "z c": "{repo}" },
{ "z p": "{repo}/pulls" }
View firefox.config.txt
browser.tabs.insertAfterCurrent = true
browser.tabs.insertRelatedAfterCurrent = true
browser.tabs.loadBookmarksInTabs = true
browser.urlbar.openintab = true
@chenshengzhi
chenshengzhi / XcodeCustomKeyBinding.plist
Last active Jun 27, 2016
Xcode duplicate and delete line
View XcodeCustomKeyBinding.plist
<key>Custom</key>
<dict>
<key>Delete Current Line</key>
<string>selectLine:, deleteBackward:</string>
<key>Duplicate Current Line</key>
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string>
</dict>
View random_password.py
#!/usr/local/bin/python3
#
# -d : no '-' in pwd
#
import random
import sys
pwdStrPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
poolSize = len(pwdStrPool)
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
View gemUninstallAllPackets.sh
for i in `gem list --no-versions`; do sudo gem uninstall -aIx $i; done
@chenshengzhi
chenshengzhi / macHideDockParameters.sh
Created Nov 5, 2015
mac dock 自动隐藏延迟设置
View macHideDockParameters.sh
//不延迟
defaults write com.apple.Dock autohide-delay -float 0 && killall Dock
//恢复默认
defaults delete com.apple.Dock autohide-delay && killall Dock
You can’t perform that action at this time.