Skip to content

Instantly share code, notes, and snippets.

MacBook 裝機步驟

警告: 請絕對不要跳著裝!

系統套件

  • Software Update
  • Install Xcode ( Mac OS X Install CD 那一塊的 >> 選擇安裝)
# on server
if [ $TERM == "dumb" ] || [ $TERM == "vt102" ]; then
export TERM="xterm-color"
screen -RD
fi
# In irssi, /set term_charset big5
# Add client id_rsa.pub to your server .ssh/authorized_keys
# use ssh://yourId@yourserver from Nally to login ;)
@peterc
peterc / irb3.rb
Created September 19, 2011 14:17
irb3 - Run an IRB-esque prompt over multiple Ruby implementations at once using RVM
#!/usr/bin/env ruby
# encoding: utf-8
# irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple
# versions of Ruby at once (using RVM)
#
# By Peter Cooper, BSD licensed
#
# Main dependency is term-ansicolor for each impl:
# rvm exec gem install term-ansicolor
anonymous
anonymous / gist:4412635
Created December 30, 2012 12:35
# Extract Service Object
@zonble
zonble / FacebookTestAccount.py
Last active December 25, 2016 13:43
A tool which helps to create and delete test account for Facebook.
import urllib, urllib2, json
'''
The ``FacebookTestUserManager`` module
======================================
Author: Weizhong Yang <zonble at gmail dot com>
A tool which helps to create and delete test account for Facebook.
[submodule "zsh-syntax-highlighting"]
path = zsh-syntax-highlighting
url = git://github.com/zsh-users/zsh-syntax-highlighting.git
@edokeh
edokeh / index.js
Last active October 26, 2024 12:35
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@yorkxin
yorkxin / README.md
Last active August 21, 2019 17:40
Proxy to remote server with CORS support

cors.py for mitmproxy

Hacking CORS restriction to enable in-browser XHR to any server.

Usage

Say you are running an web app at localhost, and you want to send XHR to http://remote-server:80, but the CORS restriction forbids access because you are sending requests from an origin that remote-server:80 does not allow.

Run:

@pahud
pahud / aws-get-credentials.js
Last active November 21, 2022 16:51
AWS CredentialProviderChain example in aws-sdk of NodeJS
'use strict';
var AWS = require('aws-sdk');
//var P = require('bluebird');
var aws_region = process.env['AWS_REGION'] ? process.env['AWS_REGION'] : 'us-west-2'
var aws_profile = process.env['AWS_PROFILE'] ? process.env['AWS_PROFILE'] : 'default'
AWS.CredentialProviderChain.defaultProviders = [