Skip to content

Instantly share code, notes, and snippets.

View mkitt's full-sized avatar
🤘
Milk runs.

Matthew Kitt mkitt

🤘
Milk runs.
View GitHub Profile
@gvarela
gvarela / dev-dns
Created April 28, 2015 16:34
Mimic pow and powder by generating a local nginx conf file that is symlinked to the homebrew nginx configuration. requires dnsmasq and nginx to be installed.
#!/bin/bash
rm .nginx.conf
while [[ $# > 1 ]]
do
key="$1"
case $key in
-p|--port)
PORT="$2"
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@jejacks0n
jejacks0n / Gemfile
Last active December 18, 2015 12:29
Tiny Rails + Teaspoon setup (uses mocha by default). A good place to start with a small coffeescript project.
source 'https://rubygems.org'
gem 'rails'
gem 'haml-rails'
gem 'coffee-rails'
gem 'sass-rails'
# Build process dependencies
gem 'uglifier' # javascript compression
gem 'yui-compressor' # css compression
class Page
require 'uri'
require 'json'
require 'net/http'
require 'net/https'
def initialize(name, markup, css)
@name = name
@markup = markup
@css = css
@gvarela
gvarela / bindable.coffee
Created February 7, 2012 22:50
Light weight DI for client side components in CoffeScript..
class window.Bindable
constructor: (context=$('body'), @dataKey='bindable')->
@bindables = $("[data-#{@dataKey}]", context)
@instanceKey = "#{@dataKey}-instance"
bindAll: ->
@bind(el) for el in @bindables
@tj
tj / Makefile
Created September 21, 2011 03:04
index.html: docs/index.md
markdown < $< \
| cat head.html - tail.html \
> $@
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@rynbyjn
rynbyjn / LazySusan.as
Created May 13, 2011 21:49
AS3 LazySusan/Carousel class for moving objects around a circle with pseudo 3D
package com.boyajian.ui
{
import com.greensock.TweenLite;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh