This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// リモートブランチの確認 | |
$ git branch -r | |
// ローカルにチェックアウト | |
$ git checkout -b sub-branch origin/sub-branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# これだけでnpmとnodeが手に入る | |
$ sudo apt-get install npm | |
# 確認 | |
$ nodejs -v | |
# 最新のnode.jsにアップデート | |
$ sudo add-apt-repository ppa:chris-lea/node.js | |
$ sudo apt-get update | |
$ sudo apt-get dist-upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
リモート側で | |
$ cd hoge.git | |
$ rm -rf * | |
$ git init --bare | |
$ git config --bool core.bare true | |
を行う。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE); | |
DisplayMetrics dm = new DisplayMetrics(); | |
wm.getDefaultDisplay().getMetrics(dm); | |
// dp -> px はこの値をdpの値にかければよい | |
dm.density; | |
// px -> dp はこの値でpxの値をわればよい | |
dm.density; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install virtualbox | |
$ wget http://files.vagrantup.com/packages/0ac2a87388419b989c3c0d0318cc97df3b0ed27d/vagrant_1.3.4_x86_64.deb | |
$ sudo dpkg -i vagrant_1.3.4_x86_64.deb | |
$ vagrant -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -L https://www.opscode.com/chef/install.sh | sudo bash | |
$ echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile | |
$ sudo gem install knife-solo | |
$ knife configure | |
return連打。デフォルトでとりあえずOK。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String[] array = getResources().getStringArray(R.array.strings); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(actibityContext, android.R.layout.simple_spinner_dropdown_item, array); | |
spinner.setAdapter(spinnerArrayAdapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spinner.setSelection(7); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo gem install rubygems-update | |
$ sudo rubygems-update | |
$ gem -v |