Skip to content

Instantly share code, notes, and snippets.

View brianleroux's full-sized avatar
💚
You are now aware that you are breathing

Brian LeRoux brianleroux

💚
You are now aware that you are breathing
View GitHub Profile
@topfunky
topfunky / Cakefile
Created April 14, 2011 22:18
Watch both Sass and Coffee files and compile on change (for Node.js)
###
Modified from https://github.com/jashkenas/coffee-script/blob/master/Cakefile
Part of an upcoming PeepCode screencast. This snippet is MIT Licensed.
###
{spawn, exec} = require 'child_process'
task 'assets:watch', 'Watch source files and build JS & CSS', (options) ->
runCommand = (name, args) ->
@filmaj
filmaj / index.html
Created July 1, 2011 01:14
Rotation of elements in PhoneGap using CSS transform and PhoneGap Compass API
<html>
<head>
<title>Compass Test</title>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, target-densityDpi=device-dpi" />
<script type="text/javascript" src="phonegap.0.9.6.1.js"></script>
<script type="text/javascript">
var d = -45,
e = null,
w = null;
function win(h) {
@balupton
balupton / README.md
Last active September 29, 2018 18:31
Responsive layouts in stylus

Responsive layouts in stylus

Why this way?

  1. There is no span1..15 styles, instead your css defines your layout and your html remains semantic and not polluted with display information. As it should be.

  2. The markup is incredibly easy, you specify the wrappers width, and then each columns width in percentages. Every other grid framework I've found is incredibly complicated with this.

  3. It allows you to have the exact same markup, and completely different styles for different devices, resolutions, stylesheets, whatever. As it should be.

@pmuellr
pmuellr / ApacheCon-cities.txt
Created February 21, 2012 23:27
list of ApacheCon cities
ApacheCon NA 2011 - Vancouver
ApacheCon NA 2010 - Atlanta
ApacheCon US 2009 - Oakland
ApacheCon EU 2009 - Amsterdam
ApacheCon US 2008 - New Orleans
ApacheCon EU 2008 - Amsterdam
ApacheCon US 2007 - Atlanta
ApacheCon EU 2007 - Amsterdam
ApacheCon US 2006 - Austin
ApacheCon AP 2006 - Colombo, Sri Lanka
@domenic
domenic / promises.md
Last active April 1, 2025 01:54
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@jeffgca
jeffgca / node_shebang.js
Last active December 11, 2015 10:59
My current node.js boilerplate
#!/usr/bin/env node
var util = require('util'),
fs = require('fs'),
path = require('path'),
mysql = require('mysql'),
moment = require('moment-range'),
async = require('async'),
csv = require('csv'),
YAML = require('libyaml'),
@SlexAxton
SlexAxton / .zshrc
Last active March 24, 2025 17:35
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@jordwalke
jordwalke / gist:6350319
Last active September 10, 2016 16:27
ReactJS: JavaScript just like you've always done it.
/**
* ReactJS: JavaScript like you've always done it.
*
* This example renders your top ten most followed friends/followers, `filter`ing
* only your favorites, and putting a star on all verified accounts.
*
* With ReactJS, any time your data changes, the UI is always brought up to date
* automatically. If friends length changes, or followCount - it always shows what
* `render` describes.
*/
@DamonOehlman
DamonOehlman / npmd-all-the-things
Last active December 28, 2015 04:38
In preparation for potentially having no net access for a while, I'm using @dominictarr's [npmd](https://github.com/dominictarr/npmd) to bring modules I need (or potentially might use down locally). I'm sure the script can use some improvements, but it works well enough for me know.Basically, head into a parent directory somewhere where you have…
#!/usr/bin/env bash
getopts ":r:" RECURSE
for dir in *; do
if [ -d "${dir}" ]; then
pushd "$dir" > /dev/null
if [ -e package.json ]; then
echo "reinstalling packages with npmd for: ${dir}"
rm -rf node_modules