Skip to content

Instantly share code, notes, and snippets.

View olvado's full-sized avatar

Oli Matthews olvado

  • madebymany
  • London
View GitHub Profile
@olvado
olvado / initializer.js
Last active August 29, 2015 14:16
BigBirdify
"use strict";
var $ = require('jquery');
var BigBird = require('bigbird');
// BigBird Nodules
var Messenger = require('./app/messenger');
var Welcome = require('./app/welcome');
// BigBird Initializer
@olvado
olvado / .cfg
Created July 2, 2015 10:06
Simple Middleman deploy script using s3cmd
[default]
access_key = ACCESS_KEY
secret_key = SECRET_KEY
bucket_location = US
cloudfront_host = cloudfront.amazonaws.com
cloudfront_resource = /2010-07-15/distribution
default_mime_type = binary/octet-stream
delete_removed = False
dry_run = False
encoding = UTF-8
@olvado
olvado / gist:99735
Created April 22, 2009 11:19
Example of Act As Recomendable
class Book < ActiveRecord::Base
has_many :user_books
has_many :users, :through => :user_books
end
class UserBook < ActiveRecord::Base
belongs_to :book
belongs_to :user
end
ruby script/plugin install http://svn.liverail.net/svn/plugins/railsdav
@olvado
olvado / modernizr.js
Created October 25, 2010 14:35
An example of using Modernizr in JavaScript
if (Modernizr.localstorage) {
localStorage.setValue('my_key','my_value')
} else {
document.cookie = 'my_key=my_value; expires=Thu, 2 Aug 2011 21:40:00 UTC; path=/'
}
@olvado
olvado / modernizr.html
Created October 25, 2010 14:32
HTML 5 classes added using Modernizr
<html class="js canvas canvastext no-geolocation rgba hsla multiplebgs
borderimage borderradius boxshadow opacity cssanimations csscolumns
cssgradients cssreflections csstransforms csstransforms3d
csstransitions video audio localstorage sessionstorage webworkers
applicationcache fontface">
@olvado
olvado / modernizr.css
Created October 25, 2010 14:36
An example of using Modernizr in CSS
/* for browsers supporting localStorage */
.localstorage p {
color:blue;
}
/* for browsers not supporting localStorage */
.no-localstorage p {
color:red;
}
self.frame = CGRectMake(0.0f, 0.0f, 200.0f, 150.0f);
[UIView beginAnimations:@"Zoom" context:NULL];
[UIView setAnimationDuration:0.5];
self.frame = CGRectMake(0.0f, 0.0f, 1024.0f, 768.0f);
[UIView commitAnimations];
@olvado
olvado / gist:3993008
Created November 1, 2012 10:46
Helper to test what controller and/or action the current view is
def is_controller(string)
str = string.split("#")
str.length == 1 ? string == controller_name : string == "#{controller_name}##{action_name}"
end
@olvado
olvado / mxm_jerk_chicken.md
Last active December 21, 2015 05:39
Nomnom Jerk Chicken

MxM (#Fel) Jerk Chicken

Hat tip: @LyttleR

Nomnom

Feeds 4-6

Ingredients

  • 8 chicken thighs (boned or otherwise) - tbh any chicken will do but leg/drumstick/thighs are best, can even jerk an entire chicken
  • Handfull of molasses (unrefined) sugar