Skip to content

Instantly share code, notes, and snippets.

View eduardo's full-sized avatar

Edu Fernández eduardo

View GitHub Profile
<% iterations.each do |iteration| %>
<h2 id='Sprint_<%= iteration.number %>' style='display:inline'>Sprint <%= iteration.number %></h2><i> - ends <%= iteration.finish.strftime("%Y-%m-%d") %></i><a href='#Sprint_<%= iteration.number %>' class='anchor'>&nbsp;&para;</a>
<ul>
<% iteration.stories.each do |story| %>
<li class='story'><h3 style='display:inline'><i>Story <%= story.id %> (<%= story.current_state %>)</i></h3>
<small class='taskCount'><i><%= " - #{story.tasks.size} tasks defined" if story.respond_to?(:tasks) %></i></small>
<p class='storyDescription'><span class="storyIngress"><%= story.name%></span><br><span class="storyRest" style="color:grey"></span></p>
<% end %>
</ul>
<% end %>
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
# example of translator snippet
require "translator"
puts Translator.translate("Hello World", "en", "fr")
A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case
Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement
Please fork, tweet about, etc.
----
Creating Shazam in Java
A couple of days ago I encountered this article: How Shazam Works
This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?
.gradient (@from: #eee, @to: #ccc) {
background-color: @from;
background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image: -moz-linear-gradient(center top, @from, @to);
}
task :finish do
next if ENV['NOCAMPFIRE']
require "#{rails_root}/lib/campfire"
branch_name = branch.split('/', 2).last
msg = "#{deploying_user}'s #{rails_env} deployment of #{branch_name} is done!"
if rand > 0.7
msg.sub! /done\!$/, 'NOW DIAMONDS!'
end
Campfire.notify msg
end
## FORVO PRONOUNCIATION APP FOR TROPO.COM
## by @Skram / [email protected] / blog.marksilver.net
# == TRY IT ==
# SMS: (202) 618-0887
# Jabber: [email protected]
#
# == USAGE ==
# message tropo bot: [a word/phrase/whatever you want to hear in different accents from around the world.]
# example input: gruyere
@eduardo
eduardo / large
Created December 26, 2010 21:36 — forked from progrium/large
#!/bin/bash
echo -e "tell application \"Quicksilver\"\nshow large type \"$1\"\nend tell" | osascript
/*!
* JavaScript whatevCache - v0.2pre - 12/30/2010
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
// whatevCache.set( key, value [, ttl ] );
$ sudo su -
# mkdir /etc/resolver
# cat > /etc/resolver/test
nameserver 127.0.0.1
port 2155
^D
^D
$ brew install dnsmasq
$ dnsmasq --port=2155 --no-resolv --address=/.test/127.0.0.1
$ ping foo.test