Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chenshengzhi's full-sized avatar

Neil chenshengzhi

  • Xiamen, Fujian, China
View GitHub Profile
@chenshengzhi
chenshengzhi / swift中的下划线(_)用法.swift
Last active October 1, 2016 06:11
swift中的下划线(_)用法
//if循环中, 替代变量名来忽略对值的访问
let base = 3
let power = 10
var answer = 1
for _ in 1...power {
answer *= base
}
print("\(base) to the power of \(power) is \(answer)")
@chenshengzhi
chenshengzhi / random_password.py
Last active February 10, 2017 11:41
random password
#!/usr/local/bin/python3
#
# -d : no '-' in pwd
#
import random
import sys
pwdStrPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
poolSize = len(pwdStrPool)
browser.tabs.insertAfterCurrent = true
browser.tabs.insertRelatedAfterCurrent = true
browser.tabs.loadBookmarksInTabs = true
browser.urlbar.openintab = true
@chenshengzhi
chenshengzhi / github_custom_hotkey_settings.json
Last active January 28, 2019 02:21
GitHub Custom Hotkey Settings
{
"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" }
@chenshengzhi
chenshengzhi / sublimeText3.md
Last active February 7, 2019 11:17
sublime text 3

sublime text 3:

1.plugins  
2.C build  
3.keymap  
4.preferences  
5.OS X command line tool  
6.header omment snippet  
@chenshengzhi
chenshengzhi / gemUninstallAllPackets.sh
Created November 6, 2015 01:46
卸载所有gem包
for i in `gem list --no-versions`; do sudo gem uninstall -aIx $i; done
@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active April 13, 2024 09:40
git ssh 代理设置

仅为 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_hotkyes.json
Last active April 13, 2024 13:40
Github Custom Hotkeys
{
"all": [
{ "z z": "#hotkey-settings" },
{ "z y": "{repo}/branches/yours" },
{ "z c": "{repo}/" },
{ "z r": "{repo}/releases" },
{ "z t": "{repo}/tags" },
{ "z q": "{repo}/pulls" },
{ "z b": "{repo}/branches" },
{ "r r": "{repo}/releases/new" }