Skip to content

Instantly share code, notes, and snippets.

View is8r's full-sized avatar
🙂

Yu Ishihara is8r

🙂
View GitHub Profile
@is8r
is8r / .gitconfig
Created June 21, 2012 15:11
.gitconfigの便利設定メモ
[alias]
st = status
co = checkout
di = diff
br = branch
ci = commit -a
cancel = reset --soft HEAD^ #直前のコミットを取り消す
zip = archive --format=zip --prefix=archive/ HEAD^ -o archive.zip #直前のコミットの差分ファイルをzipで抽出
ad = add .
cm = commit -m
@is8r
is8r / .bash_profile
Last active October 6, 2015 08:38
.bash_profileの便利設定メモ
alias g='git'
alias gi='git init && git add . && git commit -m "first commit"'
alias gc='g add -A && git commit -a'
alias r='rails'
alias rs='rails s'
alias rgs='rails g scaffold'
alias bi="bundle install"
alias be="bundle exec rackup"
alias sq="mysql.server"
alias sqrs='mysql.server start && rails s'
@nantekkotai
nantekkotai / gist:2841665
Created May 31, 2012 07:27
Objective-Cで非同期通信を行う

Objective-Cで非同期通信を行なってAPIを叩くなどする場合はどうやるのか。

初期化

まず2つ変数を用意する。

@implementation Hogeee {
    NSMutableData *hogeData;
    NSURLConnection connection;
}
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"