Skip to content

Instantly share code, notes, and snippets.

View littlemove's full-sized avatar

Diego Fernández Fernández littlemove

  • BeBanjo
  • Asturias - Spain
View GitHub Profile
class Admin::WadusController < ApplicationController
before_filter :require_admin
layout "admin"
inherit_resources
respond_to :html
back_section :contents
protected
@littlemove
littlemove / rawclone.rb
Created November 18, 2010 15:38
Reads a file with the output from gem list and installs the gems
#! /usr/bin/ruby
# So you want to start developing an already "woking" project. No
# bundle, config.gem's not present or messing up dependencies. Fear
# not!
# Do a "gem list" wherever the project is already working
# (production?, some colleage machine?). Make a file with this format:
#
# chronic (0.2.3)
# colored (1.1)
Twitter summaries: beyond visualization
========================================
The use of Twitter during conferences or courses is becoming common
practice --the so-called backchannel-- but it's also gaining momentum
as a medium to collectively narrate ongoing events such as "breaking
news" or sports meetings. Thus, Twitter becomes a way to summarize the
event and stimulate the conversation, not only among those users
physically attending, but also among anyone interested in the given
event.
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?
module Categorizable
def self.included(base)
base.send :extend, ClassMethods
end
module ClassMethods
def acts_as_categorizable
has_many :audience_scopes, :as => :audienciable
class NewsItem < ActiveRecord::Base
include Categorizable
...
acts_as_categorizable
end
class NewsItem < ActiveRecord::Base
...
acts_as_categorizable
end
module Categorizable
def self.included(base)
base.has_many :audience_scopes, :as => :audienciable
base.has_many :audience_categories, :through => :audience_scopes
base.has_many :areas, :through => :audience_scopes
...
class Event
has_many :attendings
has_many :attendees, :through => :attendings, :source => :user do |id|
# Esto es un poco oscuro pero se explica rápido: redefinimos el operador << para que
# al insertar un usuario en un evento, si previamente ya se encontraba apuntado al mismo
# se borre.
def <<(user)
attending = Attending.find_by_user_id_and_event_id(user.id, self.proxy_owner.id)
attending.blank? ? Attending.create(:user_id => user.id, :event_id => self.proxy_owner.id) : attending.destroy
“You can take a group of idiots that maybe even didn’t go to school, don’t understand computer science, don’t understand software development engineering techniques, hate each other, don’t understand the business domains, have lousy engineering tools and uniformly, they will produce CRAP every increment.“
Ken Schwaber - “Scrum et al.“@ Google Tech Talks
Talking about Waterfall Vs SCRUM Software Development Process
¿Qué es "Agil"?
Individuals and interactions over processes and tools
Working software over comprehensive documentation