Skip to content

Instantly share code, notes, and snippets.

View lucasmncastro's full-sized avatar

Lucas Castro lucasmncastro

View GitHub Profile
@lucasmncastro
lucasmncastro / amigo_oculto.rb
Created December 19, 2010 12:37
Super script para sorteio do amigo oculto :P
#!/usr/bin/env ruby
participantes = %w(
sara
andre
lucas
belle
marina
cacique
arthur
// Função para buscar todos os seguidores de um usuário do Twitter.
var fs = []
function followers(username, cursor) {
$.ajax({
url: 'http://api.twitter.com/1/statuses/followers.json',
data: {screen_name: username, cursor: cursor},
dataType: 'jsonp',
success: function(data) {
module RequiredAttributes
def self.included(base)
base.class_eval do
class << self
@@required_attributes = []
def required?(attribute)
@@required_attributes.include? attribute
end
private
# Define template_exists? for Rails 2.3 (cause it's deprecated)
unless ActionController::Base.private_instance_methods.include? 'template_exists?'
def template_exists?(path)
self.view_paths.find_template(path, response.template.template_format)
rescue ActionView::MissingTemplate
false
end
end
jTabbedPane.setSelectedIndex(0);
jTabbedPane.setEnabledAt(1, false);