start new:
tmux
start new with session name:
tmux new -s myname
Install ruby 2.0 without rbenv/rvm: | |
$ apt-get -y update | |
$ apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
$ cd /tmp | |
$ wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz ### <<< check for a newer version of ruby before executing this |
- is used where you would normally use <% | |
= is used where you would normally use <%= | |
% A percentage sign is HTML tags. Like: %h1 , %ul , %li | |
# A hash is the name of an id of a div tag. For example, #comment is for id="comment" | |
. A period is for the name of a class of a div tag. For example, .comment is for the class="comment" |
" .vimrc | |
" load up pathogen and all bundles | |
syntax on " show syntax highlighting | |
filetype plugin indent on | |
set autoindent " set auto indent | |
set ts=2 " set indent to 2 spaces | |
set shiftwidth=2 | |
set expandtab " use spaces, not tab characters |
So you like to write some complicated tests plugged into your rake tasks. Or may be you think you're doing a crime not doing so. I understand. Nothing is wrong with that. But it's more like buying a helicopter so you can travel two blocks in Manhattan. | |
I'll explain: | |
1 - Rake tasks are not meant to be a complicated piece of your website. Instead, rake tasks are meant to be "thin" and only to invoke other modules in your system. Those modules do the heavy work. Those modules are what really matters. So, test the meaningful code and not the code that invokes it. Well, if you are still feeling unconfident about the invoking processes ... then: | |
2 - Trust rails and trust the whole framework. Don't bother testing whether this rake task is going to print something minor. It will work. Otherwise, you have a bigger issue that missing tests in the framework. | |
In summary: Focus your energy more on testing the functionality that this rake task is written to invoke, which is a class or a method some where else in your |
#!/usr/bin/env bash | |
sudo yum -y update && sudo yum -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev libyaml wget rubygems | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
sudo make | |
sudo make install | |
gem install chef ruby-shadow --no-ri --no-rdoc |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
" .vimrc | |
" load up pathogen and all bundles | |
syntax on " show syntax highlighting | |
filetype plugin indent on | |
set autoindent " set auto indent | |
set ts=2 " set indent to 2 spaces | |
set shiftwidth=2 | |
set expandtab " use spaces, not tab characters |
########################### | |
# Configuration | |
########################### | |
# use 256 term for pretty colors | |
set -g default-terminal "screen-256color" | |
# increase scroll-back history | |
set -g history-limit 5000 |
set -g prefix C-a # Make C-a the prefix instead of default | |
bind C-a send-prefix # Send to application | |
unbind C-b # Unbind C-b | |
set -sg escape-time 1 # Remove delay for keystrokes | |
setw -g mode-keys vi # Use vi mode | |
### Mouse mode ### | |
setw -g mode-mouse on # Toggle mouse mode globally | |
set -g mouse-select-pane on # Select pane using mouse |