Skip to content

Instantly share code, notes, and snippets.

View pootsbook's full-sized avatar

Philip Poots pootsbook

  • ClubCollect
  • Alphen aan den Rijn, NL
View GitHub Profile
@pootsbook
pootsbook / jekyll_sort.rb
Created August 13, 2014 14:21
Sorting custom collections in Jekyll
# Two files, default sort order is alphabetical ascending on file name.
# _config.yml
collections:
albums:
output: true
# _albums/audio_video_disco.md
---
@pootsbook
pootsbook / Gemfile
Last active December 16, 2015 19:29
Ember.js with dependencies, 83K minified and gzipped, +18K if you're using ember-data.
source 'https://rubygems.org'
gem 'rake-pipeline', github: 'livingsocial/rake-pipeline'
gem 'rake-pipeline-web-filters', github: 'wycats/rake-pipeline-web-filters'
gem 'uglifier'
@pootsbook
pootsbook / facebook.rb
Last active December 16, 2015 19:59
Get a Facebook or Twitter Profile Image
require 'koala'
client = Koala::Facebook::API.new(user_access_token)
picture_response = client.get_object('me', fields: "picture.width(200).height(200)")
# { "id"=>"37100599",
# "picture" => {
# "data"=> {
# "url"=>"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/c205.44.551.551/s200x200/314850_740167411782_1416727952_n.jpg",
# "width"=>200,
# "height"=>200,
@pootsbook
pootsbook / references
Last active December 18, 2015 04:29
Precompiling Handlebars Templates with Rake::Pipeline
Issue about better documentation:
https://github.com/emberjs/ember.js/issues/2319
Handlebars PreCompiler, Barber:
https://github.com/tchak/barber
SO Question about PreCompilation with Rake::Pipeline:
http://stackoverflow.com/questions/8558062/setting-up-rake-pipeline-for-use-with-handlebars-alongside-google-app-engine
Blog Post about Barber Handlebars precompilation:
# Rake Pipeline with MiniSpade
http://www.javascriptturnsmeon.com/javascript-build-process-rake-pipeline-with-minispade/
# Minispade
https://github.com/wycats/minispade
@pootsbook
pootsbook / gist:6220792
Created August 13, 2013 12:53
Assets Performance in Rails
# Rails Asssets Configuration
http://upstre.am/blog/2011/10/http-caching-assets-in-rails-3-1/
# EngineYard Asset Tips
https://support.cloud.engineyard.com/entries/21009802-Rails-3-1-Asset-Pipeline-Tips
# Cloudinary Static Assets
http://cloudinary.com/blog/how_to_deliver_your_static_images_through_a_cdn_in_ruby_on_rails
@pootsbook
pootsbook / gist:6548972
Last active December 22, 2015 23:49
Sass-Rails Asset Helpers
asset-path($relative-asset-path, $asset-class)
asset-path("rails.png", image) => "/assets/rails.png"
image-path($relative-asset-path)
font-path($relative-asset-path)
video-path($relative-asset-path)
audio-path($relative-asset-path)
javascript-path($relative-asset-path)
stylesheet-path($relative-asset-path)

Keybase proof

I hereby claim:

  • I am pootsbook on github.
  • I am pootsbook (https://keybase.io/pootsbook) on keybase.
  • I have a public key whose fingerprint is 2E2E 008E CD35 37FE 46D2 67AB E74F 6DFC 04AE D9B7

To claim this, I am signing this object: