Skip to content

Instantly share code, notes, and snippets.

View metade's full-sized avatar

Patrick Sinclair metade

View GitHub Profile
require 'rubygems'
require "bundler/setup"
require 'ruby-processing'
require 'logger'
require 'tweetstream'
require 'yaml'
require 'ostruct'
<!--#set var="has_video" value="1"-->
<!--#if expr="$has_video=1" -->
<!--#config timefmt="%H%M" --><!--#set var="c5_time" value="${DATE_LOCAL}" -->
<!-- TESTING <!--#echo var="c5_time"--> -->
<!--#if expr="(${c5_time} >= 2000 && ${c5_time} < 2100)" -->
<!-- 20:00 - 21:00 -->
<!--#set var="video0_pid" value="bbc_three"-->
<!--#set var="video0_title" value="BBC Three"-->
require 'lib/lastfm'
require 'icebox'
require 'pp'
class Lastfm
include HTTParty::Icebox
cache :store => 'file', :timeout => 31_556_926, :location => 'tmp', :logger => STDOUT
end
api_key = 'api_key'
require 'rubygems'
require 'pp'
DURATION = 60
INTERVAL = 3
SPEEDS = {
:off => 0,
:slow => 0.3334,
:medium => 0.75,
:fast => 1
require 'rubygems'
require 'open-uri'
require 'json'
class SlotCars
attr_accessor :keywords
def self.start(keywords)
slotcars = SlotCars.new(keywords)
while(true)
require 'rubygems'
require 'hpricot'
require 'htmlentities'
require 'mustache'
require 'pp'
def clean_string(string)
coder = HTMLEntities.new
clean = coder.decode(string)
clean.gsub!("\302\240", ' ')

Hi, my name is Hazel and I’ve been asked to write something about myself here. Well, the first thing to say I suppose is that I’ve been homeless for years. Living on the streets, especially as a woman, is stressful. Looking back, it’s head down and get on with it. Make sure your back’s safe. I now sell the Big Issue, to whom I am grateful for helping me get my confidence back.

I was asked by The Sock Mob last year to be a London walking tour guide for the London Bridge Festival (now the London Fringe). I really enjoyed doing it and even went on the radio to tell others about it. I met a load of great people and must have impressed somebody because this year I’ve been asked to mentor other homeless people to be tour guides, which is challenging but exciting!

Please come on our tour as it is a tour with a difference and helps the people out here who literally live on the streets. Losing your home and family can happen to anyone, and I think it’s great that people like The Sock Mob take the time to stop and ca

require 'rubygems'
require 'open-uri'
require 'hpricot'
require 'sqlite_cache'
$cache = SqliteCache.new('my_cache.db')
def copen(url)
$cache.do_cached(url) do
puts "fetching: #{url}"