This file contains hidden or 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
require 'open-uri' | |
require 'json' | |
your_access_token = "put your access token from the Graph API Explorer here" | |
url = "https://graph.facebook.com/me/home?fields=from,picture,link,source,name,description,type&access_token=#{your_access_token}" | |
result = JSON.parse(open(url).read) | |
posts = result["data"] | |
This file contains hidden or 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
pictures = [ | |
{ :url => "http://i.cdn.turner.com/dr/teg/coco/release/sites/default/files/0229_ShaqRoar.gif", :name => "Shaq", :caption => "Shaq is going to eat Conan" }, | |
{ :url => "http://i.imgur.com/AvKuM6i.gif", :name => "Shaq being Shaq", :caption => "Awesome" }, | |
{ :url => "http://instntrply.com/wp-content/uploads/2011/12/shaqtree.gif", :name => "Christmas Tree", :caption => "TNT" }, | |
] | |
pictures.each do |pic| | |
p = Picture.new | |
p.name = pic[:name] | |
p.url = pic[:url] |
This file contains hidden or 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
#----- Individuals------# | |
require 'open-uri' | |
require 'json' | |
base_url = "http://api.crunchbase.com/v/1/" | |
key = "atsvjzz7q9apzywd9ex3t67e" | |
api_key = "&api_key=#{key}" | |
people = "people.js?" | |
data = JSON.parse(open(base_url+people+api_key).read) |
This file contains hidden or 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
# --- Seeds the State Database ---- # | |
states = { | |
'ABA'=> 'American Bar Association', | |
'AL' => 'Alabama', | |
'AK' => 'Alaska', | |
'AZ' => 'Arizona', | |
'AR' => 'Arkansas', | |
'CA' => 'California', |
This file contains hidden or 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
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |
This file contains hidden or 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
grep <sitemap file> --only-matching -E -e 'http(s?):\/\/[^ \"\(\)\<\>]*' >> links.txt | |
for i in `cat links.txt` ; do curl -I $i ; done (edited) |
This file contains hidden or 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
# google_analytics.js.coffee | |
class @GoogleAnalytics | |
@load: -> | |
window['GoogleAnalyticsObject'] = 'ga' | |
window['ga'] = window['ga'] || -> | |
(window['ga'].q = window['ga'].q || []).push arguments | |
window['ga'].l = 1 * new Date() |
This file contains hidden or 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
rails new . --database=postgresql --skip-bundle -T |
This file contains hidden or 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
require 'date' | |
require 'harvested' | |
class MissingHarvestEntries | |
attr_accessor :subdomain, :username, :password, :timesheet, :missing_entries, :start_date, :end_date | |
def initialize(start_date, end_date) | |
@subdomain = 'MY SUBDOMAIN' | |
@username = 'MY USERNAME' | |
@password = 'MY PASSWORD' |
This file contains hidden or 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
require "spec_helper" | |
describe ExampleController do | |
context "GET #index" do | |
let(:resources) { FactoryGirl.create_list(:resource) } | |
before do | |
get :index | |
end |
OlderNewer