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
def main | |
checkInput | |
end | |
def checkInput stackCount=0 | |
stackCount = gets.strip.to_i+1 if stackCount == 0 | |
doInputWork gets.strip | |
return if stackCount <= 1 | |
checkInput stackCount-1 | |
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
#!/usr/bin/env ruby | |
def inFibo? f | |
if f.is_a? Array | |
f = [ f[1], (f[0] + f[1]), f[2] ] | |
#puts "#{f.inspect} ? #{f[1]} == #{f[2]}" | |
if f[1] < f[2] | |
return inFibo? f | |
elsif f[1] == f[2] | |
return true | |
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
rails new rails-bootstrap -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb |
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
#!/usr/bin/env ruby | |
# ruby -e "$(curl -L https://gist.githubusercontent.com/Workman/7554012/raw/)" project_name | |
# Clones RapidRails and sets up local dev environment | |
require 'securerandom' | |
abort("You didn't specify a name for your app!") if !ARGV[0] || ARGV[0].empty? | |
def prompt(*args) | |
print(*args) | |
STDIN.gets.chomp |