Skip to content

Instantly share code, notes, and snippets.

<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://flincteam.org/piwik/" : "http://flincteam.org/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
@michels
michels / gist:3059540
Created July 6, 2012 11:03
Timetables-API
{
"rides": [
{
"type": "ride_search",
"start": {
"country": "Deutschland",
"county": "Hessen",
"city": "Dieburg",
"postcode": "64807",
"track_order": 0,
[ { "id" : 6,
"stops" : [ { "arrival_time" : "2008-02-01T00:00:00Z",
"bus_id" : 6,
"id" : 11,
"station" : { "city" : "",
"coords" : "(0,0)",
"created_at" : "2013-04-23T17:24:34Z",
"house_number" : "",
"id" : 3,
"name" : "Nordpol",
@michels
michels / openweather_emoji.rb
Last active June 8, 2021 21:32
Uses the OpenWeatherMap to get an emoji based on the current weather // OpenWeaterMap emoji matcher in ruby.
OPENWEATHER_APIKEY = "" # TODO add your apikey here
lat = "49.868183" # latitude of the city you want to get the weather from
lon = "8.626288499" # longitude of the city you want to get the weather from
def getWeatherEmoji(weatherID)
# Openweathermap Weather codes and corressponding emojis
thunderstorm = "\u{1F4A8}" # Code: 200's, 900, 901, 902, 905
drizzle = "\u{1F4A7}" # Code: 300's
rain = "\u{02614}" # Code: 500's
@michels
michels / voicetotext_spec.rb
Last active November 14, 2016 07:55
Spec "VoiceToText"
describe "VoiceToText" do
let(:valid_path_to_voice_file) { "./fixtures/voice-example.au" }
let(:valid_path_to_empty_voice_file) { "./fixtures/voice-example-empty.au" }
let(:soundfile) {
Soundfile.create(
:url => "uploader.url",
:description => "description",
:apikey => "apikey",
:project => "project",