Skip to content

Instantly share code, notes, and snippets.

@dexteryy
dexteryy / 如何让命令行工具通过代理正常访问github
Created January 23, 2013 12:43
如何让命令行工具通过代理正常访问github
首先你需要一个不怕dns污染的http代理,比如连接到私人VPS的ssh tunnel+privoxy之类…
以下例子里我都使用10.8.0.1:8118作为代理服务器。
## 让普通命令行工具使用代理
可以在~/.profile或~/.bashrc里加上:
```
enable_proxy() {
export http_proxy="10.8.0.1:8118"
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'