start new:
tmux
start new with session name:
tmux new -s myname
| // by @noffle | |
| autoinstall () { | |
| local MODULES=$(cat $1 | grep "require('.*')" | sed "s/.*require('\(.*\)')/\1/" | grep -v '^\.' | tr '\n' ' ') | |
| shift | |
| shift | |
| npm install $MODULES $@ | |
| } |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://gist.github.com/johnrees/7581236/raw/hack.sh | sh | |
| # |
| cd ~ | |
| sudo apt-get update | |
| sudo apt-get install openjdk-7-jre -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| # include from an initializer | |
| module HstoreAccessor | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| module ClassMethods | |
| def hstore_accessor(hstore_attribute, *keys) | |
| Array(keys).flatten.each do |key| |
| !!! | |
| /[if lt IE 7] <html class="no-js ie6 oldie" lang="en"> | |
| /[if IE 7] <html class="no-js ie7 oldie" lang="en"> | |
| /[if IE 8] <html class="no-js ie8 oldie" lang="en"> | |
| <!--[if (gt IE 8)]><html lang="en" class="no-js"><![endif]--> | |
| %head | |
| %meta{charset: "utf-8"} | |
| %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"} | |
| %title 'Rails 3.1.1 barebones HTML5Boilerplate' |