Skip to content

Instantly share code, notes, and snippets.

@mba811
mba811 / Sublime Text 2 - 实用快捷键 (Mac OS X).textile
Last active August 29, 2015 14:00 — forked from lucifr/gist:1208100
Sublime Text 2 - 实用快捷键 (Mac OS X)

##安装zsh

brew install zsh

设置zsh为默认shell

mate /etc/shells

在文末增加:

#!/usr/bin/env bash
# Pre-requisites
sudo apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
@mba811
mba811 / dnsmasq.txt
Last active August 29, 2015 14:07 — forked from ahmozkya/README.md
安装 DNSMasq dnscrypt
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
# as the long options legal on the command line. See
# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
# Custom development domains
address=/.dev/127.0.0.1
address=/.dom/127.0.0.1
@mba811
mba811 / OS X 10.md
Last active August 29, 2015 14:11 — forked from chrisb/gist:4d6a09c6cc1ca2e1b14e
OS X 10.10 问题与解决方法

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@mba811
mba811 / whitelist.pac
Last active August 29, 2015 14:12 — forked from janlay/whitelist.pac
网络设置(SOCKS)
/*
* A white-list based PAC without regexp, by @janlay
* It's just simple and fast.
* Last update: Dec 9, 2013
* Special thanks to @Paveo
*/
function FindProxyForURL(url, host) {
// REPLACE PROXY WITH YOUR OWN'S
var PROXY = "PROXY 127.0.0.1:8800;SOCKS 127.0.0.1:8801";
var DEFAULT = "DIRECT";
@mba811
mba811 / 代理规则.md
Last active August 29, 2015 14:13
浏览器代理设置

##代理规则

####Privoxy + SOCKS:

使用方法:将浏览器的“代理服务器自动配置脚本”设置为

http://autoproxy2pac.appspot.com/pac/privoxy
@mba811
mba811 / tmux.md
Last active August 29, 2015 14:13
tmux 终端伴侣

##Homebrew 安裝 tmux

首先要安裝 Homebrew,沒有安裝過的話只要在終端機執行這一行指示即可:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

儘管剛剛才安裝 Homebrew 但是還是要先更新一下再安裝程式:

brew update

@mba811
mba811 / Git常用命令备忘.md
Created January 10, 2015 13:40
Git常用命令备忘

Git常用命令备忘

Git配置

git config --global user.name "robbin"
git config --global user.email "[email protected]"
git config --global color.ui true
git config --global alias.co checkout
git config --global alias.ci commit

git config --global alias.st status

@mba811
mba811 / 一个生成SVN Graph的ruby脚本.md
Created January 11, 2015 05:19
一个生成SVN Graph的ruby脚本
# In order to run this script, the following command line tools must be installed:
# 1) a subversion client, under Windows, Slik SVN is recommended: http://www.sliksvn.com/en/download
# 2) a Graphviz toolset, which can be downloaded from http://www.graphviz.org/
# Also the following ruby gems must be installed:
require 'rubygems'
 
#'xmlsimple'
# gem: http://rubyforge.org/frs/?group_id=638
# doc: http://xml-simple.rubyforge.org/