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
nocompatible | |
Last set from ~/.vimrc | |
textwidth=80 | |
nopaste | |
wrapmargin=0 | |
formatoptions=croql | |
Last set from ~/.vim/ftplugin/ruby.vim | |
formatexpr= | |
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 'rubygems' | |
require 'sinatra' | |
module ::Haml::Filters::Maruku | |
end | |
get '/' do | |
"blah" | |
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
|--story [1]-| | |
---[a]------------[b]----[c]---------[d]---[e]- | |
jan feb mar apr may jun jul aug sep oct nov dec | |
----------------------------------------------- | |
---[2]------| |--[2]- | |
Cases: | |
[a] ends_at > today, | |
ends_at < starts_at | |
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 parse_my_data | |
send_data "foo" | |
if {received_data} == "bar" | |
send_data "success!" | |
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
def incoming # or 'context incoming', nevermind. | |
# Send: 'exec play hello-world' | |
play 'hello-world' | |
# Send: 'wait for digit' and read return | |
selection = input(4) | |
# .. | |
play 'success' if selection == 4 | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="guidesXML.send()"> | |
<mx:HTTPService | |
id="guidesXML" | |
url="http://localhost:4567/guides/" | |
result="guideHandler(event)" | |
resultFormat="e4x" /> | |
<mx:Script> |
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
<?xml version="1.0" encoding="iso-8859-1"?> | |
<guides> | |
<guide> | |
<id>1</id> | |
<name>woo</name> | |
</guide> | |
<guide> | |
<id>2</id> | |
<name>foobar</name> | |
</guide> |
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
$ irb | |
>> require 'harry_from_xml' | |
>> xml = '<menu> | |
<drink> | |
<name>Death in the Afternoon</name> | |
</drink> | |
<drink> | |
<name>Mojito</name> | |
</drink> | |
</menu>' |
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 'rubygems' | |
require 'dm-core' | |
require 'ftools' | |
incoming do | |
iv = new_instant_vox | |
iv.handle_call | |
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
incoming do | |
#jump to another context | |
+another_context | |
play "hello-world" | |
end | |
another_context do | |
play "foo" | |
end |