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
self.class.send(:define_method, :"has space") do |arg| | |
puts "lol" << arg | |
end | |
self.class.send(:define_method, :"has several spaces") do |arg| | |
puts "Ahahah. Lol." << arg | |
end | |
self.class.send(:define_method, :"takes several args") do |arg, arg2| | |
puts "tuuuuup" << arg << arg2 |
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
vagrant@precise64:~$ babushka 'git' --debug | |
Defining core:task template | |
Defining core:installer template | |
Defining core:external template | |
Defining core:managed template | |
Defining core:gem template | |
Defining core:pip template | |
Defining core:npm template | |
Defining core:tmbundle template | |
Defining core:app template |
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
dep "thing" do | |
met? { | |
(@f ||= 0) == 1 | |
} | |
meet { | |
@f = 1 | |
} | |
after { | |
sudo "echo foo" | |
} |
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
servers = ( | |
{ | |
address = "storm.psych0tik.net"; | |
chatnet = "psych0tik"; | |
port = "6697"; | |
use_ssl = "yes"; | |
ssl_verify = "no"; | |
ssl_pkey = "~/.irssi/certs/psych0tik-richo.key"; | |
ssl_cert = "~/.irssi/certs/psych0tik-richo.crt"; | |
}, |
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
diff --git a/lib/babushka/shell.rb b/lib/babushka/shell.rb | |
index f8f7b76..af64d62 100644 | |
--- a/lib/babushka/shell.rb | |
+++ b/lib/babushka/shell.rb | |
@@ -81,7 +81,11 @@ module Babushka | |
pipe_in.close | |
write_fds.delete(pipe_in) | |
else | |
- pipe_in.write(buf) | |
+ begin |
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
[9] pry(main)> s = n.all[0] | |
=> <AWS::EC2::Instance id:i-1101936d> | |
[10] pry(main)> show-source s.dns_name | |
From: /Users/richo/.rvm/gems/ruby-1.9.3-p327/gems/aws-sdk-1.7.0/lib/aws/core/resource.rb @ line 2 | |
29: | |
Number of lines: 13 | |
Owner: AWS::EC2::Instance | |
Visibility: public |
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
col = [1, 2, 3] | |
some_value = 0 | |
col.each do |i| | |
val = "thing" | |
some_value = i | |
end | |
begin |
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
[1] pry(main)> t = Class.new do |klass| | |
[1] pry(main)* def foo | |
[1] pry(main)* puts "rawr" | |
[1] pry(main)* end | |
[1] pry(main)* end | |
=> #<Class:0x007fd112992a38> | |
[2] pry(main)> t.new.foo | |
rawr | |
=> nil | |
[3] pry(main)> |
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
ubuntu@juiCi:~$ babushka 'contests dev' --debug | |
Defining core:homebrew template | |
Defining core:fhs template | |
Defining core:babushka template | |
Defining core:app template | |
Defining core:task template | |
Defining core:tmbundle template | |
Defining core:installer template | |
Defining core:src template | |
Defining core:lib template |
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
[4] pry(main)> case "rawr" | |
[4] pry(main)* when Proc.new { |f| f == "butts" } | |
[4] pry(main)* "butts" | |
[4] pry(main)* when Proc.new { |f| f == "rawr" } | |
[4] pry(main)* "rawr" | |
[4] pry(main)* end # => "rawr" |