This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function%20c(a){if(a.nodeType==3)a.nodeValue=a.nodeValue.replace(/\b(you)(r)\b/ig,"$1'$2e");else{a=a.childNodes;for(var%20b=0;b<a.length;b++)c(a[b])}})(document.body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('a').click(function() { | |
$(this).toggleClass('open').next().toggle('fast'); | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check for person | |
person = Highrise::Person.find :first, :from => :search, | |
:params => { :criteria => { :email => contact.email } } | |
unless person | |
# otherwise, create manually using a fucked up contact_data hash/array | |
person = Highrise::Person.create :name => contact.name, | |
:contact_data => { | |
:email_addresses => [ | |
{ :address => contact.email, | |
:location => 'Work' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ApplicationController | |
respond_to :html, :xml, :json | |
# GET /posts | |
# GET /posts.xml | |
def index | |
@posts = Post.paginate :page => params[:page] | |
respond_with @posts do |format| | |
format.atom | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'cramp' | |
gem 'erubis', '2.6.5' | |
gem 'thin' | |
gem 'usher', "0.6.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steve souders | |
9%/91% backend / frontend | |
site speed => google page rank | |
google webmaster tools, yslow, page speed | |
webpagetest.org | |
video, screenshot timeline | |
overwrite document.write | |
html5 iframe | |
increase browser disk cache | |
progressive rendering |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem "bson_ext" | |
gem "haml" | |
gem "mongoid", ">= 2.0.0.beta.16" | |
gem "mongoid_rails_migrations" | |
gem "rails3-generators" | |
gem "database_cleaner", :group => :test | |
gem "rspec-rails", ">= 2.0.0.beta.17", :group => :test | |
generators = <<-GENERATORS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def photos_from_flickr | |
api_key = 'blargh' | |
url = "http://api.flickr.com/services/rest/?method=flickr.collections.getTree&api_key=#{api_key}&collection_id=20446502-72157624005829771&user_id=20451842%40N05&format=json&nojsoncallback=1" | |
@sets = open url do |f| | |
collection = JSON.parse(f.read)['collections']['collection'].first | |
collection['set'].map do |set| | |
url = "http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=#{api_key}&photoset_id=#{set['id']}&format=json&nojsoncallback=1" | |
photos = open(url) { |f| JSON.parse(f.read)['photoset']['photo'] } | |
photos.each do |p| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit e7f8e63585ae24968a01a58ff181674187601e57 | |
Author: Visnu Pitiyanuvath <visnupx@gmail.com> | |
Date: Thu Aug 19 00:12:41 2010 -0700 | |
team slugs | |
diff --git a/db/slug.js b/db/slug.js | |
new file mode 100644 | |
index 0000000..f56a883 | |
--- /dev/null |