Skip to content

Instantly share code, notes, and snippets.

@bicherele
bicherele / f3-case-flite-retina.scss
Created August 30, 2012 07:26 — forked from smileyj68/f3-case-flite-retina.scss
Foundation 3 Case Study: Flite Retina
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
#topnav {
#logo {
a {
background-image: url(/img/flitelogo@2x.png);
background-size: 156px 22px;
}
}
}
@bicherele
bicherele / gist:3097633
Created July 12, 2012 11:38 — forked from efeminella/gist:1937609
Loading external Handlebars Templates with jQuery or Zepto
/*
* Extends Handlebars with a basic get method for loading external
* Handlebars templates. Simply pass an options object which contains
* the following properties:
* - path (required) : Path to the external template file to be loaded
* - success (required) : Callback invoked with the compiled loaded template.
* - cache (optional) : true if the template is to be cached, otherwise false.
*
* In addition to the above arguments, any jQuery/Zepto.ajax options argument
* can be specified as well.
@bicherele
bicherele / jquery.ba-tinypubsub.js
Created July 3, 2012 07:55 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@bicherele
bicherele / chef_solo_bootstrap.sh
Created July 2, 2012 07:30 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
var util = require('util'),
exec = require('child_process').exec,
rest = require('restler');
var alertMe = function(){
exec('say -v Cellos Bobby, come get your nodejitsu beta');
};
var checkSite = function(){
util.puts('checking if I can get you into the beta yet.');
@bicherele
bicherele / jquery.myplugin.coffee
Created March 14, 2012 14:20 — forked from jimeh/jquery.myplugin.coffee
Example jQuery plugin written in CoffeeScript, and the resulting compiled JavaScript file.
$.fn.extend
myplugin: (options) ->
self = $.fn.myplugin
opts = $.extend {}, self.default_options, options
$(this).each (i, el) ->
self.init el, opts
self.log el if opts.log
$.extend $.fn.myplugin,
default_options:
@bicherele
bicherele / gist:2029646
Created March 13, 2012 16:12 — forked from friggeri/gist:1570840
More CoffeeScriptish
do ($ = jQuery) ->
$.fn.zebraTable = (options) ->
defaults =
evenColor: '#ccc'
oddColor : '#eee'
options = $.extend(defaults, options)
@each ->
$("tr:even", @).css('background-color', options.evenColor)
$("tr:odd", @).css('background-color', options.oddColor)
@bicherele
bicherele / README.md
Created March 6, 2012 09:05 — forked from fnichol/README.md
Vagrantify: Create a chef-solo enabled Vagrant virtual machine for development

Installation

gem install thor
mkdir -p ~/vagrants && cd ~/vagrants
curl -LO https://raw.github.com/gist/1528832/vagrantify
chmod 755 vagrantify

Usage

./vagrantify init webserver

@bicherele
bicherele / Rakefile
Created February 29, 2012 11:11 — forked from twistedmind/Rakefile
directory "tmp"
file "tmp/hello.tmp" => "tmp" do
sh "echo 'Hello' > 'tmp/hello.tmp'"
end
task :default => 'morning:turn_off_alarm'
namespace :morning do
desc "Turn off alarm."
@bicherele
bicherele / csv-to-json.php
Created February 22, 2012 10:03 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed