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
config-one / one: RSS 22M | |
config-all / all: RSS 23M |
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 session_initiated | |
set("foo", "bar") {} | |
# @queue: [Proc{}] | |
set("lol", "cat") {} | |
# @queue: [Proc{}] | |
read "/foo/bar.mp3" do |result| | |
.. | |
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
require 'rubygems' | |
require 'isaac' | |
configure do |c| | |
c.nick = "wallabotz" | |
c.server = "irc.freenode.net" | |
c.verbose = true | |
end | |
on :connect do |
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 SetContentTypeCharSet | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
status, headers, body = @app.call(env) | |
headers['Content-Type'] += "; charset=UTF-8" | |
[status, headers, body] | |
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
class Array | |
def >> obj | |
ArrayMover.new delete(obj) | |
end | |
end | |
class ArrayMover | |
def initialize(obj) | |
@obj = obj | |
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
# This is our base controller, much like ApplicationController in Rails | |
class App < Sinatra::Base | |
# Default settings that should be shared by all controllers | |
set :foo, :bar | |
def shared_helper | |
# this will be available for everything | |
end | |
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
19:05 < harryv> nice. trying to restore nancie :) | |
19:24 < cypher23> harryv, why? what happened to her? | |
19:36 < harryv> cypher23: I rebuild my slice and in that process killed the config and made no backup :P | |
19:37 < tbyhlmann> Gosh, at least she's not pregnant. | |
20:10 < lenary> tbyhlmann: http://github.com/ichverstehe/nancie/tree/master you can help make mini-nancies if you want.... | |
20:11 < tbyhlmann> I don't tweet at all! | |
20:13 < lenary> go on, make nancie pregnant | |
20:13 < lenary> you know you want to | |
20:19 < lenary> (just press the fork button) | |
20:20 < cypher23> I can never look at GitHub the same way again after reading what lenary just wrote |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { alert("window.onload") } | |
</script> | |
</head> | |
<body> | |
Testside. | |
<script type="text/javascript"> | |
alert("end of <body>"); |
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
get '/:foo' do | |
if request.xhr? | |
... | |
else | |
... | |
end | |
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
require 'sinatra' | |
get '/' do | |
"Hello world" | |
end |