Skip to content

Instantly share code, notes, and snippets.

View nsanta's full-sized avatar

Nicolas Santa nsanta

  • Rio Cuarto, Cordoba, Argentina
View GitHub Profile
@nsanta
nsanta / gist:701156
Created November 15, 2010 23:16
moron twitter page
<style type="text/css">
body {background-color: #000000;
background-image: url(http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/twittbkg3.jpg);
background-position: top center;
background-repeat: no-repeat;height: 1080px;
}
#footer ul li {display:inline;margin:0 3px;}
.connect-button {width:150px;margin:0 auto; text-align:center; margin-top:-360px}
#avatar-twitter {margin-left:-900px}
.icon-twitter {background: transparent url(/images/elements/social-icons.png) no-repeat 0 0; margin-left:-900px}
@nsanta
nsanta / gist:701153
Created November 15, 2010 23:15
moron content
center>
<div style="margin-top:230px; margin-left:-30px" >
<div>
<a href="http://promojam.com/promotions/Album/auth_twitter/new" target="_blank" onmouseover="document.twitt.src='http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/twitterR.png'" onmouseout="document.twitt.src='http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/twitter.png'"><img src="http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/twitter.png" width="487" height="89" border="0" name="twitt" /></a>
</div>
<div>
<a href="http://promojam.com/promotions/Album/auth_facebook/new" target="_blank" onmouseover="document.face.src='http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/facebookR.png'" onmouseout="document.face.src='http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/facebook.png'"><img src="http://curated.culturejam.com/wp-content/themes/curated_yamidoo/yamidoo/keisha/facebook.png" width="490" height="
@nsanta
nsanta / gist:701152
Created November 15, 2010 23:14
moron css
html, body {height:100%;}
body * {font-family: "Helvetica Neue", Helvetica, "Century Gothic", Verdana, Arial, sans-serif;}
h1 , h2, h3, h4, h5, h6 {font-weight:bold;}
h1 { font-size: 2em; margin: 10px 0;}
h2 { font-size: 1.5em; margin: 10px 0;}
h3 { font-size: 1.17em; margin: 10px 0;}
h4 { font-size: 1em; margin: 10px 0;}
h5 { font-size: 0.8em; margin: 10px 0;}
h6 { font-size: 0.5em; margin: 10px 0;}
.font_sm {font-size:10px;}
require 'resque_scheduler'
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
resque_config = YAML.load_file(rails_root + '/config/resque.yml')
Resque.redis = resque_config[rails_env]
Resque.schedule = YAML.load_file(File.join(File.dirname(__FILE__), '../resque_schedule.yml'))
Dir[File.join("app","jobs", "*.rb")].each {|file| require file }
class String
/home/nicolas/projects/helloworld/vendor/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing': uninitialized constant Redis::Namespace (NameError)
from /home/nicolas/projects/helloworld/vendor/ruby/1.8/gems/resque-1.9.9/lib/resque.rb:36:in `redis='
from /home/nicolas/helloworld/promojam/config/initializers/resque.rb:5
# A sample Gemfile
source :rubyforge
#
gem "rails" , '2.3.5'
gem 'mongrel'
gem 'ruby-debug'
gem 'mysql'
gem "clearance"
gem "whenever"
gem 'haml', '>=2.2.0'
file 'Gemfile', <<-GEMS
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta4"
gem "bson_ext"
gem "mongoid", "2.0.0.beta4"
gem "haml", "3.0.0.rc.2"
gem "compass", "0.10.0.rc4"
gem "inherited_resources"
group :test do
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Album do
before :each do
@website = Factory(:website)
@album = @website.albums.build(Factory(:album).attributes)
@album.save
end
it "should be valid" do
@album.should be_valid
NameError in Account/contactsController#index
uninitialized constant Account::ContactsController
RAILS_ROOT: /home/nicolas/projects/finario
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/inflector.rb:361:in `constantize'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/inflector.rb:360:in `each'
accepts_nested_attributes_for :rfx_event_members ,
:reject_if => proc{|attributes| attributes[:role].blank? || attributes[:user_id].blank?}
def reject_new_record?(association_name, attributes)
has_delete_flag?(attributes) ||
self.class.reject_new_nested_attributes_procs[association_name].try(:call, attributes)
end