Skip to content

Instantly share code, notes, and snippets.

View eduardo's full-sized avatar

Edu Fernández eduardo

View GitHub Profile
require 'yaml'
def yacss(data)
YAML.load(data).map do |item|
item.map do |selector, properties|
"#{selector} {\n" +
properties.map do |property, value|
" #{property}: #{value};\n"
end.join +
"}\n"
edu@snowdrop /usr/local/Cellar/mysql/5.1.37/bin
$ ./mysql_install_db
Installing MySQL system tables...
090914 0:23:15 [Warning] Forcing shutdown of 1 plugins
OK
Filling help tables...
090914 0:23:15 [Warning] Forcing shutdown of 1 plugins
OK
To start mysqld at boot time you have to copy
@eduardo
eduardo / gist:192604
Created September 24, 2009 08:10 — forked from ddollar/gist:107308
* keep people working on internal projects, assign and schedule the work
* dont look desperate, dont have immediate availability
* can tell a client you can 'shuffle internal projects' to accomodate them
* online ads dont work well
* referrals instead
* do a great job every single time
* voice calls important
* when people call you call them back
http://www.refinerycms.com/
http://www.intridea.com/2009/9/22/tweetstream-ruby-access-to-the-twitter-streaming-api?blog=development
http://developingwithstyle.com/articles/2009/09/23/railings-a-full-featured-ruby-on-rails-template.html
http://www.braintreepaymentsolutions.com/
http://www.youtube.com/watch?v=fb9Rzyi8b90&hl=es
http://gilesbowkett.blogspot.com/2009/09/theres-no-such-thing-as-good-client.html
http://almosteffortless.com/2009/09/11/static-a-super-simple-rails-cms-for-heroku/
http://blog.moove-it.com/using-facebooker-to-make-a-rails-site-with-facebook-connect-part-1/
http://themacbox.co.uk/tweetmymac/
http://blog.moove-it.com/using-facebooker-to-make-a-rails-site-with-facebook-connect-part-1/
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Switch to 1.9.1 and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.1@rails3
<% 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);
}