x-ite's diary

覚え書きです。想定読者は俺

2012-10-01から1ヶ月間の記事一覧

macports python envs path

#.bashrc export VIRTUALENV_USE_DISTRIBUTE=true VIRTUALENVWRAPPER_VIRTUALENV="virtualenv-2.7" if [ -f /opt/local/bin/virtualenvwrapper.sh-2.7 ]; then export WORKON_HOME=$HOME/.virtualenvs source /opt/local/bin/virtualenvwrapper.sh-2.7 fi ex…

Chef knife cookbook create

knife cookbook create $packpage -o .

vimrc smartindent ruby python

autocmd FileType python setl autoindent autocmd FileType python setl smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class autocmd FileType python setl tabstop=8 expandtab shiftwidth=4 softtabstop=4 autocmd FileType ruby…

C++0x C++11 random

#include <iostream> #include <random> #include <chrono> using namespace std; int main() { std::mt19937 engine(std::chrono::system_clock::now().time_since_epoch().count()); std::uniform_int_distribution<int> distribution( 1, 100000000 ) ; int array[1000000 + 1]; for (int</int></chrono></random></iostream>…