Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'xmpp4r'
include Jabber
Jabber.debug = true
client = Client.new(JID::new(""))
client.connect('talk.google.com',5222)
client.auth("")
@c7
c7 / sv.yml
Created February 23, 2009 15:06
Sample localization file for Swedish
# Sample localization file for Swedish. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
sv:
date:
formats:
default: "%d.%m.%Y"
short: "%e. %b"
long: "%e. %B %Y"
only_day: "%e"
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, asf, from 'disabled-135699-2.wmv':
Duration: 00:01:27.63, start: 15.000000, bitrate: 1320 kb/s
Stream #0.0: Audio: wmav2, 44100 Hz, stereo, s16, 96 kb/s
Stream #0.1: Video: wmv3, yuv420p, 640x480, 1104 kb/s, 25 tbr, 1k tbn, 1k tbc
#!/usr/bin/env ruby
#
# SHRUG Blocket Scraper
#
# Author: Peter Hellberg <@peterhellberg>
# Microformat: hListing <http://microformats.org/wiki/hlisting-proposal>
# License: WTFPL
require 'cgi'
require 'rubygems'
@c7
c7 / all_links.rb
Created February 17, 2010 15:33
Show all links on a page
# Handle the data structures
[
['distributionevent', 'distribution_events', DistributionEvent],
['storage', 'storages', Storage]
].each do |name, accessor, structure_class|
data = product_data[name]
self.send("#{accessor}=", (!data.nil? && data.size > 0) ?
data.map { |d| structure_class.new d } : [])
end
#!/bin/sh
iconv -t utf8 -c data/WebExtract.csv > data/web_extract_utf8.csv
iconv -t utf8 -c data/cuisine.csv > data/cuisine_utf8.csv