Skip to content

Instantly share code, notes, and snippets.

View pixelhandler's full-sized avatar
🍊
Working remotely

Bill Heaton pixelhandler

🍊
Working remotely
View GitHub Profile
@nathansmith
nathansmith / html_reset.css
Created January 28, 2010 00:02
Reset for HTML4 / HTML5
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,
@bkeating
bkeating / howto-filemerge-git-osx.md
Created March 11, 2010 21:36
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@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
@pixelhandler
pixelhandler / index.html
Created October 11, 2010 23:57
Event Pooling example using jQuery
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Event Pooling, or perhaps Pub/Sub</title>
<script type="text/javascript" charset="utf-8" src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
</head>
<body>
<strong>Who is this?</strong>
<form action="#" method="get" accept-charset="utf-8" id="whoisit">
@cowboy
cowboy / HEY-YOU.md
Last active April 9, 2024 15:54
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
window.addEventListener "DOMContentLoaded", ->
body = $ "body"
canvas = $ "#canvas"
chalkboard = $ "#chalkboard"
close = $ "#close"
ledge = $ "#ledge"
lightswitch = $ "#lightswitch"
output = $ "#output"
shade = $ "#shade"
share = $ "#share"
@kusor
kusor / markdown.vim
Created December 1, 2010 07:44
Little plugin to open Markdown preview in browser.
" markdown.vim
" Markdown preview using RDiscount ruby gem.
" Put this file into .vim/ftplugin
command! -nargs=0 MarkdownPreview call MarkdownRenderBufferToPreview()
noremap <buffer> <Leader>rp :MarkdownPreview<CR>
setlocal ignorecase
setlocal wrap
// Promise implementation based on unscriptable's minimalist Promise:
// https://gist.github.com/814052/
function Promise () {
this._thens = [];
}
Promise.prototype = {
/* This is the "front end" API. */
@briancavalier
briancavalier / tiny closure Promise.js
Created February 7, 2011 12:55
A closure version of my mod (https://gist.github.com/814313) to unscriptable's tiny promise (https://gist.github.com/814052/)
function Promise() {
var callbacks = [],
promise = {
resolve: resolve,
reject: reject,
then: then,
safe: {
then: function safeThen(resolve, reject) {
promise.then(resolve, reject);
}
@jboesch
jboesch / ecmascript.next_modules.js
Created April 23, 2011 17:37
ECMAScript.Next Modules
// Current way of doing modules, you have to expose it via a return statement to make it public.
var Thing = (function(){
function getStuff(){ alert('Stuff retrieved!');
return {
getStuff: getStuff
}
})();
// ECMAScript.Next proposal... adding "export" will make functions public.
// I wonder why they didn't just call it "public function".. export sounds like I'm downloading or something. Meh.