This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# | |
# rai.tv - mplayer per rai.tv :P | |
# | |
#~$> ./rai.tv.sh http://www.rai.tv/dl/RaiTV/programmi/media/ContentItem-6b72f482-f5bf-4d28-bb1a-f04d1f99a984.html?p=0 | |
# | |
#cheers :) | |
# | |
PLIST= |
This file contains hidden or 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 Sinatra | |
class Base | |
def call!(env) | |
@env = env | |
@request = Request.new(env) | |
@response = Response.new | |
@params = indifferent_params(@request.params) | |
force_encoding(@params) |
This file contains hidden or 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/base' | |
require 'padrino-helpers' | |
class SimpleObject | |
attr_accessor :foo, :bar, :moo, :goo | |
end | |
class App < Sinatra::Base | |
register Padrino::Helpers |
This file contains hidden or 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/base' | |
require 'padrino-helpers' | |
class SimpleObject | |
attr_accessor :foo, :bar, :moo, :goo | |
end | |
class App < Sinatra::Base | |
register Padrino::Helpers |
This file contains hidden or 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
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGSEGV | |
[[Backtrace]] | |
0 rbx 0x000000010000f1d0 _ZN8rubiniusL12segv_handlerEi + 160 | |
1 libSystem.B.dylib 0x00007fff883df66a _sigtramp + 26 | |
2 ??? 0x00007fff5fbf36e0 0x0 + 140734799754976 | |
3 libSystem.B.dylib 0x00007fff883c0ad7 vsnprintf + 355 | |
4 rbx 0x00000001001a7173 rb_raise + 211 |
This file contains hidden or 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
{ | |
"site":{ | |
"locales":["it"], | |
"acl":{ | |
"admin":["links","photos","posts","pages","taxonomy"] | |
} | |
} | |
} |
This file contains hidden or 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
<% taxons.each do |t| -%> | |
<% if t.class == Array -%> | |
<%= partial "taxonomy/chooser", :locals => { :f => f, :taxons => t } %> | |
<% else -%> | |
<span style="margin-left: <%= 15*t.depth %>px"> </span> | |
<input type='checkbox' name="taxonomy[]" value="<%= t.id %>" <%= tax_checked?(t.id, f.object.taxonomy) %> ><%= t.title %><br> | |
<% end -%> | |
<% end -%> |
This file contains hidden or 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
/* settings */ | |
var showDuration = 6000, | |
container = $('#yoga_wrapper'), | |
images = container.find('img').css({"opacity":"0"}), | |
currentIndex = 0; | |
/* worker */ | |
var show = function() { | |
$(images[currentIndex]).animate({"opacity":0}); | |
$(images[currentIndex = currentIndex < images.length - 1 ? currentIndex + 1 : 0]).animate({"opacity":1}); | |
}; |
This file contains hidden or 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 "yajl/json_gem" | |
JSON_TEMPLATE = { | |
mongo:{ | |
host:"127.0.0.1", | |
name:"user", | |
user:"user", | |
password:"password" | |
}, | |
deploy:{ |
This file contains hidden or 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 'mongo' | |
module MongoPubSub | |
QUEUES_COLLECTION = 'queues' | |
class EndSubscriptionException < Exception; end | |
class Publisher | |
def initialize(queue_name, mongo_connection) | |
# Initialize queue collection as a capped collection | |
if not mongo_connection[QUEUES_COLLECTION].collection_names.include?(queue_name) |
OlderNewer