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
#!/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 |
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
# 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 |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
def green(string) | |
"\033[0;32m#{string}\033[1;37m" | |
end | |
if !ARGV[0].nil? |
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
#!/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' |
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
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 |
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
# 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" |
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 'xmpp4r' | |
include Jabber | |
Jabber.debug = true | |
client = Client.new(JID::new("")) | |
client.connect('talk.google.com',5222) | |
client.auth("") |