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 Hash | |
def deep_has_key?(key) | |
self.has_key?(key) || any? {|k, v| v.deep_has_key?(key) if v.is_a? Hash} | |
end | |
alias :deep_include? :deep_has_key? | |
alias :deep_key? :deep_has_key? | |
alias :deep_member? :deep_has_key? | |
def deep_has_value?(value) | |
self.has_value?(value) || any? {|k,v| v.deep_has_value?(value) if v.is_a? Hash} |
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
0 - Additional Products | |
707 - 600 GB iSCSI SAN Snapshot Space | |
4426 - Citrix NetScaler VPX 10.1 200Mbps Platinum | |
4513 - Dedicated Load Balancer with High Availability and SSL - 150,000 Connections | |
4612 - 6500 GB iSCSI SAN Replication | |
4184 - 750GB EVault Disk to Disk Enterprise Backup | |
4427 - Citrix NetScaler VPX 10.1 200Mbps Standard | |
902 - CDN Pay as You Go Storage | |
4028 - .com - 9 year | |
703 - 350 GB iSCSI SAN Snapshot Space |
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
Fonte: http://gohorseprocess.wordpress.com | |
1- Pensou, não é XGH. | |
XGH não pensa, faz a primeira coisa que vem à mente. Não existe | |
segunda opção, a única opção é a mais rápida. | |
2- Existem 3 formas de se resolver um problema, a correta, a errada e | |
a XGH, que é igual à errada, só que mais rápida. |
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
gem 'delayed_job' | |
gem 'delayed_job_mongoid' | |
gem 'thin' | |
gem 'heroku' |
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
puts "Start typing away." | |
while (line = STDIN.readline).strip != "" | |
puts eval(line) | |
end |