https://github.com/harrah/xsbt/wiki/Getting-Started-Setup
https://github.com/n8han/conscript
https://github.com/n8han/giter8
| // grayscale color filter | |
| float r = 0.298912F; | |
| float g = 0.586611F; | |
| float b = 0.114478F; | |
| ColorMatrixFilter filter = new ColorMatrixFilter( | |
| new ColorMatrix(new float[] { | |
| r, g, b, 0, 0, | |
| r, g, b, 0, 0, |
| SimpleDateFormat format = new SimpleDateFormat("E MMM d kk:mm:ss Z yyyy", Locale.US); | |
| Date datetime = format.parse("Thu Jun 10 01:32:13 +0000 2010"); |
| package org.sazabi.lib.preference; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.graphics.drawable.Drawable; | |
| import android.preference.Preference; |
| # install boost-1.49.0 | |
| cd ~/src | |
| curl -L "http://downloads.sourceforge.net/project/boost/boost/1.49.0/boost_1_49_0.tar.gz?r=http%3A%2F%2Fwww.boost.org%2Fusers%2Fhistory%2Fversion_1_49_0.html&ts=1331091084&use_mirror=jaist" | tar zxv | |
| cd boost_1_49_0 | |
| ./bootstrap.sh | |
| ./b2 | |
| sudo ./b2 --prefix=/usr/local/boost_1_49_0 install |
| #!/bin/sh | |
| curl -sL 'https://github.com/downloads/libevent/libevent/libevent-2.0.20-stable.tar.gz' | tar zx | |
| cd libevent-2.0.20-stable/ | |
| ./configure --prefix=/usr/local/libevent/2.0.20-stable | |
| make | |
| sudo make install | |
| sudo alternatives --install /usr/local/lib64/libevent libevent /usr/local/libevent/2.0.20-stable/lib 20018 \ | |
| --slave /usr/local/include/libevent libevent-include /usr/local/libevent/2.0.20-stable/include \ | |
| --slave /usr/local/bin/event_rpcgen.py event_rpcgen /usr/local/libevent/2.0.20-stable/bin/event_rpcgen.py |
| # by ifconfig | |
| ifconfig eth1:0 10.1.53.1 | |
| ifconfig eth1:0 down | |
| # by iproute2 | |
| ip addr add 10.1.53.1 dev eth1 | |
| ip addr show | |
| ip addr del 10.1.53.1 dev eth1 |
| # install zsh-5.0.0 | |
| # prerequisite: gcc ncurses-devel readline-devel pcre-devel zlib-devel | |
| curl -L http://jaist.dl.sourceforge.net/project/zsh/zsh/5.0.0/zsh-5.0.0.tar.bz2 | tar jx | |
| cd zsh-5.0.0/ | |
| ./configure --prefix=/usr/local/zsh/5.0.0 --enable-cap --enable-pcre --enable-multibyte | |
| make | |
| sudo make install | |
| sudo alternatives --install /usr/local/bin/zsh zsh /usr/local/zsh/5.0.0/bin/zsh 50000 |
| # install vim | |
| curl -L ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar jx | |
| cd vim73 | |
| ./configure --prefix=/usr/local/vim/7.3 --enable-multibyte --with-features=huge | |
| make | |
| sudo make install | |
| sudo alternatives --install /usr/local/bin/vim vim /usr/local/vim/7.3/bin/vim 070300 \ | |
| --slave /usr/local/bin/view view /usr/local/vim/7.3/bin/view |
| # install git | |
| # prerequisite: openssl-devel pcre-devel curl-devel expat-devel | |
| curl -sL http://git-core.googlecode.com/files/git-1.7.12.3.tar.gz | tar zx | |
| cd git-1.7.12.3/ | |
| ./configure --prefix=/usr/local/git/1.7.12.3 --with-openssl --with-libpcre --with-expat --with-curl | |
| make | |
| sudo make install | |
| sudo alternatives --install /usr/local/bin/git git /usr/local/git/1.7.12.3/bin/git 1071203 \ | |
| --slave /usr/local/bin/git-receive-pack git-receive-pack /usr/local/git/1.7.12.3/bin/git-receive-pack \ | |
| --slave /usr/local/bin/git-shell git-shell /usr/local/git/1.7.12.3/bin/git-shell \ |