a.k.a. what to do when your ISP starts blocking sites :(
Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" localhost 8080
To clear the domain and port
| brew tap homebrew/dupes # Thanks Tom | |
| brew install apple-gcc42 | |
| export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
| export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 | |
| export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 | |
| brew uninstall v8 | |
| gem uninstall libv8 |
| gem install thrift -- --with-cppflags='-D_FORTIFY_SOURCE=0' |
| [core] | |
| pager = less | |
| editor = vim | |
| [alias] | |
| ci = commit -v | |
| st = status | |
| di = diff | |
| co = checkout | |
| br = branch | |
| l = log --date=local |
| require 'net/ping' | |
| require 'colorize' | |
| require 'terminal-notifier' | |
| class InternetDiagnosis | |
| def initialize | |
| @host = 'www.google.com' | |
| @concurrency = 3 | |
| @prev_error = nil | |
| end |
| # deep_struct.rb | |
| require 'ostruct' | |
| class DeepStruct < OpenStruct | |
| def initialize(hash=nil) | |
| @table = {} | |
| @hash_table = {} | |
| if hash | |
| hash.each do |k,v| |
| # Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
| # We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
| # Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
| # | |
| # Deployment structure | |
| # | |
| # SERVER: | |
| # /etc/init.d/nginx (1. nginx) | |
| # /home/app/public_html/app_production/current (Capistrano directory) | |
| # |
| $! raise された例外オブジェクト | |
| $" require で読み込まれたファイルの配列 | |
| $# | |
| $$ 現在のプロセス ID | |
| $% | |
| $& 正規表現にマッチした箇所の文字列 | |
| $' 正規表現にマッチした箇所より後ろの文字列 | |
| $( | |
| $) | |
| $* Ruby スクリプトに指定された引数。ARGV と同じ |
Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)
Create a helloworld.c file:
#include<stdio.h>
int main()
{
int x=3;