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
abc | |
foo bar (widget dongle) | |
def | |
baz mud | |
wibble wobble | |
spaz |
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
foo bar (widget dongle) | |
baz mud | |
wibble wobble | |
spaz | |
-- or -- | |
{foo bar (widget dongle); baz mud} {wibble wobble}; spaz |
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
implementation console trace[] Hi @#two; | |
infrastructure affix[] [ foo[] a b c d [two: implementation console explode[] Yo!] ]; |
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
# fast way to include too many stylesheets | |
def include_stylesheets | |
sheets = %w(dropdown style calendar/red/style facebox) | |
sheets.collect{|sheet|stylesheet_link_tag(sheet)}.join | |
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
script/generate plugin HelloWorld | |
# vendor/plugins/hello_world/init.rb | |
Rails.configuration.gem "sinatra" | |
Rails.configuration.middleware.insert_before("ActionController::Failsafe", "HelloWorld") | |
# vendor/plugins/hello_world/lib/hello_world.rb | |
# your sinatra app goes here... | |
require 'sinatra/base' | |
class HelloWorld < Sinatra::Base |
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
goombaAt: [start_left, start_top] | |
image := load: "goomba.png" | |
draw := drawSprite: image at: [left, top] | |
left, top := walkOn: owner startingAt: [start_left, start_top] | |
game: arguments | |
<= world: arguments | |
goomba => goombaAt: [400, 300] | |
floor => rectObject: [400, 350, 800, 400] colored: {red: 100} |
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
this.queue = {}; | |
this.register_command("queue", function(context, text) { | |
var who = context.intent.name; | |
if (!this.queue[who]) this.queue[who] = []; | |
this.queue[who].push([context.sender, text]); | |
}); | |
this.register_command("dequeue", function(context, text) { | |
var who = context.intent.name; | |
if (!this.queue[who]) this.queue[who] = []; | |
var item = (text == "peek") ? this.queue[who][0] : this.queue[who].shift(); |
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
{ | |
"Core": { | |
"socket": "/tmp/diaptoval.sock" | |
}, | |
"IRC": { | |
"quit_message": "bbye!", | |
"profiles": [ | |
{ | |
"host": "irc.freenode.net", | |
"nick": ["devyn", "devyn_", "devyn__", "devyn___"], |
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
var darkf_dix = module.exports = function (hub) { | |
var self = this; | |
this.hub = hub; | |
// We register ourself as darkf_dix and are returned a handle that | |
// allows us to subscribe to or unsubscribe from events. | |
hub.register (this, "darkf_dix", function (handle) { | |
// The first argument specifies what item to subscribe to events from. | |
// If null or undefined, the default is "*". The second argument | |
// specifies what kind of events to accept. If left null or undefined, |
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
module.exports = function (hub, name) { | |
// We register ourself as darkf_dix and are returned a handle that | |
// allows us to subscribe to or unsubscribe from events. | |
hub.register (name || "darkf_dix", function (handle) { | |
// The first argument specifies what item to subscribe to events from. | |
// If null or undefined, the default is "*". The second argument | |
// specifies what kind of events to accept. If left null or undefined, | |
// it defaults to the special event kind "*", which matches any kind of | |
// event. | |
handle.subscribe ("irc/*", "message", function (e) { |
OlderNewer