I hereby claim:
- I am gusga on github.
- I am gusga (https://keybase.io/gusga) on keybase.
- I have a public key whose fingerprint is 6541 70EF DC04 1CD3 43F3 E3C5 5F45 CBE5 C936 3153
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| while : | |
| do | |
| clear | |
| date +"%A %B %d, %Y at %T" | |
| lines=`tput lines` | |
| lines=`expr $lines - 5` | |
| git --no-pager log --color --all --pretty='format:%C(auto)%d%Creset %C(yellow)%h%Creset %C(green)%an%Creset - %s - %C(cyan)%cr%Creset' --graph $* | head -n $lines | |
| sleep 1 |
| #!/usr/bin/env ruby | |
| # Libraries::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
| require 'rubygems' | |
| require 'sinatra/base' | |
| require 'slim' | |
| require 'sass' | |
| require 'coffee-script' | |
| # Application::::::::::::::::::::::::::::::::::::::::::::::::::: |
| #!bin/bash | |
| if [ -z "$1" ]; then | |
| echo "Debes ingresar el nombre del proyecto o directorio" | |
| exit 1 | |
| else | |
| if [ -e "$1" ]; then | |
| echo "El Directorio $1 ya existe" | |
| exit 1 | |
| fi |
| # Tell system when Xcode utilities live: | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| # Set "opendiff" as the default mergetool globally: | |
| git config --global merge.tool opendiff |
| require 'bundler/capistrano' | |
| set :application, "net" | |
| set :repository, "[email protected]:net.git" | |
| set :scm, :git | |
| set :default_environment, { | |
| 'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
| } |
| morse_dict = Hash.new({ | |
| "a" => ".-", | |
| "b" => "-...", | |
| "c" => "-.-.", | |
| "d" => "-..", | |
| "e" => ".", | |
| "f" => "..-.", | |
| "g" => "--.", | |
| "h" => "....", | |
| "i" => "..", |
As your business logic gets complex you may need to implement transactions. The classic example is a bank funds transfer from account A to account B. If the withdrawal from account A fails then the deposit to account B should either never take place or be rolled back.
All the complexity is handled by ActiveRecord::Transactions. Any model class or instance has a method named .transaction. When called and passed a block, that block will be executed inside a database transaction. If there's an exception raised, the transaction will automatically be rolled back.
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
SSH into Root
$ ssh [email protected]
Change Root Password