$ cd ~/Sites
$ git clone [email protected]:project-github-account/Project.git
This file contains hidden or 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
begin ordering pizza for twenty, | |
people in the meetup; it was still | |
not enough to last till | |
the end; so i have decided | |
to get more pizza before the | |
end if people != twenty |
This file contains hidden or 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
In Gemfile | |
========= | |
gem 'capistrano-rails' | |
gem 'capistrano-rbenv' | |
gem 'capistrano-rbenv-install' | |
gem 'capistrano-safe-deploy-to' | |
gem 'capistrano-sidekiq' | |
gem 'capistrano3-puma' | |
In Capfile |
This file contains hidden or 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
#! /bin/bash | |
# Run with: bash <(curl -L http://bit.ly/install-rails-on-koding-v4_2) | |
date1=$(date -u +"%s") | |
sudo apt-get update | |
sudo apt-get -y install build-essential zlib1g zlib1g-dev sqlite3 libsqlite3-dev git libssl-dev libreadline-dev libxml2-dev libpq-dev nodejs | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile |
This file contains hidden or 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
#!/bin/bash | |
sudo apt-get update | |
sudo aptitude install -y build-essential git libssl-dev libreadline6 libreadline6-dev libpq-dev nodejs curl | |
sudo aptitude install -y postgresql redis-server nginx monit | |
# Rbenv | |
cd ~/ | |
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
cat <<'EOF' >> ~/.bashrc |
This file contains hidden or 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
# assert_equal(expected, actual, msg = nil) | |
assert_equal "word", wrap("word",4) | |
assert_equal "word", wrap("word",100) | |
# within word | |
assert_equal "wor\nds", wrap("words",3) | |
assert_equal "word\ns", wrap("words",4) | |
assert_equal "word\nword", wrap("word word",4) |
This file contains hidden or 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
parse_git_dirty() { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo -en "⸕" | |
} | |
parse_git_info() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ (\1)$(parse_git_dirty)/" | |
} | |
parse_svn_dirty(){ | |
SVN_STATUS="`svn status 2> /dev/null`" | |
if [ -z "$SVN_STATUS" ] |
NewerOlder