This file contains 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
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import junitx.framework.AssertionFailedError; | |
import org.junit.Assert; |
This file contains 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
Backup::Model.new(:backup_name, 'Description') do | |
## | |
# PostgreSQL [Database] | |
# | |
database PostgreSQL do |db| | |
db.name = "db_name" | |
db.username = "username" | |
db.password = "password" | |
db.host = "host" |
This file contains 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
USAGE | |
ruby lyrics.rb "Bob Dylan" "Tangled Up In Blue" |
This file contains 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
sudo apt-get install ruby rubygems libopenssl-ruby | |
sudo gem install net-ssh net-scp |
This file contains 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
No one wants to die. Even people who want to go to heaven don’t want to die to get there. | |
And yet death is the destination we all share. No one has ever escaped it. And that is as | |
it should be, because Death is very likely the single best invention of Life. It is Life’s | |
change agent. It clears out the old to make way for the new. Right now the new is you, but | |
someday not too long from now, you will gradually become the old and be cleared away. | |
Sorry to be so dramatic, but it is quite true. | |
Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by | |
dogma — which is living with the results of other people’s thinking. Don’t let the noise | |
of others’ opinions drown out your own inner voice. And most important, have the courage |
This file contains 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
Gemfile | |
gem 'twitter-bootstrap-rails' | |
gem 'less' | |
gem 'less-rails', :git => 'git://github.com/metaskills/less-rails.git' | |
applications.css | |
/* | |
*= require bootstrap |
This file contains 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
http://www.tahititatou.com/db_therock-front-021.jpg | |
http://www.westlord.com/wp-content/uploads/2010/09/Dwayne-Johnson-Body-Tattoo.jpg | |
http://www.sabendoagora.com/wp-content/uploads/2011/10/tatuagem-dwayne-johnson-foto2.jpg | |
http://www.tahititatou.com/db_therock-side-081.jpg | |
http://4.bp.blogspot.com/-_wX3VVkRVMM/TZrXCrCYk4I/AAAAAAAADvc/jNb_rjGZ6ec/s1600/the_rock_tattoos_dwayne_johnson%2527s_tattoo_wwe+1.jpg | |
http://farm2.static.flickr.com/1426/1487268100_c2171809c9.jpg | |
http://www.tatuagem.com.br/images/stories/maori-edmundo-.jpg | |
http://farm4.static.flickr.com/3398/3454290949_423e72b9a2.jpg | |
http://www.extrapolando.com/wp-content/uploads/2010/10/tatuagens-de-maori.jpg |
This file contains 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
require 'test/unit' | |
module Kernel | |
def using(resource) | |
begin | |
yield if block_given? | |
ensure | |
resource.dispose | |
end | |
end |
This file contains 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
#with class | |
class MyClass < Array | |
def my_method | |
"w00t" | |
end | |
end | |
#without class | |
MyClass = Class.new(Array) do | |
def my_method |
This file contains 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
class A | |
@@var = "a" | |
def test | |
@@var | |
end | |
end | |
class B < A | |
@@var = "b" |