Skip to content

Instantly share code, notes, and snippets.

View wilmoore's full-sized avatar

Wil (₩) Moore III wilmoore

View GitHub Profile
@wilmoore
wilmoore / iife.js
Created October 24, 2011 03:20
IIFE Variations (JavaScript)
// from: http://jsfiddle.net/SubtleGradient/Qfawx/
// copied here only because "gists" are slightly easier for me to read
// classic (oldschool)
(function(){/*IIFE*/})();
// new standard
(function(){/*IIFE*/}());
// lol, square
@wilmoore
wilmoore / gh-buttons.css
Created October 24, 2011 08:34
How to develop a jQuery plugin with CoffeeScript
/* ------------------------------------------
CSS3 GITHUB BUTTONS (Nicolas Gallagher)
Licensed under Unlicense
http://github.com/necolas/css3-github-buttons
------------------------------------------ */
/* ------------------------------------------------------------------------------------------------------------- BUTTON */
.button {
@wilmoore
wilmoore / README.md
Created October 25, 2011 06:45 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@wilmoore
wilmoore / git-shorturl.sh
Last active December 28, 2021 20:07
Git :: git.io
########################################################################################
# function for generating a git.io short url
########################################################################################
function git-shorturl {
curl -i http://git.io -F "url=$1" 2>/dev/null | grep -i "location:"
}
@wilmoore
wilmoore / macosx+homebrew.md
Created December 27, 2011 23:57
Install SSHFS

Snow Leopard

  • brew install NTFS-3G
  • sudo cp -rfX /usr/local/Cellar/fuse4x-kext/0.8.12/Library/Extensions/fuse4x.kext /System/Library/Extensions
  • sudo chmod +s /System/Library/Extensions/fuse4x.kext/Support/load_fuse4x
  • brew install sshfs
@wilmoore
wilmoore / filelock.sh
Created December 30, 2011 23:20
A flexible file-locking mechanism
#!/bin/sh
# filelock - A flexible file-locking mechanism.
retries="10" # default number of retries
action="lock" # default action
nullcmd="/bin/true" # null command for lockfile
while getopts "lur:" opt; do
case $opt in
l ) action="lock" ;;
u ) action="unlock" ;;
r ) retries="$OPTARG" ;;
/*
A simple new-line delimited JSON protocol with upgrades.
Receiving Usage:
protocol = require('./frame-protocol');
// parsing data
parser = protocol.Parser();
@wilmoore
wilmoore / phantomjs.rb
Created January 14, 2012 23:04
homebrew formula for phantomjs (macosx static without qt dependency)
require 'formula'
class Phantomjs < Formula
url "https://phantomjs.googlecode.com/files/phantomjs-1.4.1-macosx-static-x86.zip"
homepage 'http://www.phantomjs.org/'
sha1 "416ea14ac2f9d12c3b382d169987c3829017dea8"
def install
system "qmake -spec macx-g++"
system "make"
# Cookbook Name:: mongodb
# Recipe:: default
case node['platform']
when "ubuntu"
execute "apt-get update" do
action :nothing
end
execute "add gpg key" do
@wilmoore
wilmoore / s3dd.rb
Created January 19, 2012 00:48
homebrew formula for s3dd
require 'formula'
class S3dd < Formula
head 'https://github.com/Net-Results/s3dd.git'
homepage 'https://github.com/Net-Results/s3dd'
def install
system "chmod a+x s3dd"
system "mkdir -p #{prefix}/bin"
system "cp s3dd #{prefix}/bin"