Skip to content

Instantly share code, notes, and snippets.

View andflett's full-sized avatar

Andrew Flett andflett

View GitHub Profile
@andflett
andflett / bookmarks.rake
Created May 8, 2012 22:26
Rake task to import bookmarks and tags (parent folders) from Netscape Bookmark formatted files.
require 'nokogiri'
require 'open-uri'
namespace :bookmarks do
desc '-- Import bookmarks in Netscape Bookmark format'
task :import => :environment do
doc = Nokogiri::HTML(open(File.join(Rails.root, "lib/dump/bookmarks_5_8_12.html")))
# Ensure we're dealing with the correct format
@andflett
andflett / authusersubscribe.sh
Created August 5, 2011 10:24
Instagram API: Subscribe to your authenticated users' feed
curl -F 'client_id=CLIENT-ID' \
-F 'client_secret=CLIENT-SECRET' \
-F 'object=user' \
-F 'aspect=media' \
-F 'verify_token=userSubscription' \
-F 'callback_url=http://YOUR-CALLBACK/URL' \
https://api.instagram.com/v1/subscriptions/
@media all and (max-device-width: 768px) and (orientation:portrait) {
#site { width: 525px; }
nav { float: none; width: 100%; }
}
@media all and (max-device-width: 480px) {
#site { width: 315px; }
.container aside { margin-left: 0; width: 295px; }
nav { float: none; width: 100%; }
}