Skip to content

Instantly share code, notes, and snippets.

View muratayusuke's full-sized avatar

Yusuke Murata muratayusuke

View GitHub Profile

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@muratayusuke
muratayusuke / gist:3956881
Created October 26, 2012 04:59 — forked from byplayer/gist:3915865
VirtualBpx
# change IP range for NAT
VBoxManage modifyvm "YOUR_VM_NAME" --natnet1 "192.168.0/24"
@muratayusuke
muratayusuke / gist:3916196
Created October 19, 2012 04:16 — forked from byplayer/gist:3915865
VirtualBpx
# change IP range for NAT
VBoxManage modifyvm "YOUR_VM_NAME" --natnet1 "192.168.0/24"
@muratayusuke
muratayusuke / global.sh
Last active October 10, 2015 10:47
global
##################################
# usage
##################################
# 1. cd /usr/local/src
# 2. wget https://gist.github.com/raw/3677821/c20a62a45a0d92be6190a319d7b98bdbf8dbeadb/global.sh
# 3. sudo sh global.sh ${version}
##################################
cd /usr/local/src
@muratayusuke
muratayusuke / gist:3676297
Created September 8, 2012 15:51 — forked from byplayer/gist:3629153
Git hook to disallow non-fastforward updates (also disallows merges into feature branches in order to keep them cleanly rebaseable)
#!/usr/bin/env ruby
# This update hook enforces the following policies
# 1) release and master branches are fast-forward only
# 2) feature branches cannot contain merges
$refname = ARGV[0]
$oldrev = ARGV[1]
$newrev = ARGV[2]
# for ubuntu 12.10
#
##################################
# initial task
##################################
# 1. install ubuntu on your virtual box
# 2. install Guest Addition
# 3. shutdown ubuntu and open virtualbox settings.
# 4. 「一般」→「高度」→「クリップボードの共有」→「双方向」
##################################