Skip to content

Instantly share code, notes, and snippets.

View muratayusuke's full-sized avatar

Yusuke Murata muratayusuke

View GitHub Profile
@muratayusuke
muratayusuke / chef
Last active December 15, 2015 09:29
hello chef
# setup vagrant
gem install vagrant
vagrant box add ubuntu https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box
vagrant init ubuntu
vagrant ssh-config --host melody >> ~/.ssh/config
vagrant up
vagrant gem install sahara
# setup knife-solo
git clone git://github.com/matschaffer/knife-solo.git
@muratayusuke
muratayusuke / gist:5435399
Created April 22, 2013 14:09
~/.ssh/config
Host github.com
Compression yes
Ciphers arcfour256
brew install tmux
brew install coreutils
candidates+="+${line/:*/} ${f}"
@muratayusuke
muratayusuke / set up ubuntu with chef
Last active December 19, 2015 03:28
set up ubuntu with chef
#
# in host os
#
# create new box
host-os$ cd ~/projects/chef-repo
host-os$ git pull
host-os$ vagrant up
host-os$ vagrant ssh-config --host ubuntu1404 >> ~/.ssh/config
host-os$ knife configure
# set up ubuntu
# http://blog.codeboutique.com/post/creating-debian-squeeze-box-for-vagrant
sudo su
apt-get update
apt-get upgrade
apt-get install build-essential module-assistant
m-a prepare

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 = [email protected]: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:

#!/bin/bash
function install(){
REPO=$1
DIR=$2
TARGET=$3
BUILD_DIR=~/buildxcodeplugins/work
mkdir -p ${BUILD_DIR}
rm -rf ${BUILD_DIR}/*
{
"builders":[{
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu_64",
"iso_url": "http://ubuntutym2.u-toyama.ac.jp/ubuntu//saucy/ubuntu-13.10-server-amd64.iso",
"iso_checksum": "4d1a8b720cdd14b76ed9410c63a00d0e",
"iso_checksum_type": "md5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "3000s",
## Options to set on the command line
d-i debian-installer/locale string en_US.utf8
d-i console-setup/ask_detect boolean false
d-i console-setup/layout string USA
#d-i netcfg/get_hostname string dummy
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i time/zone string UTC