Skip to content

Instantly share code, notes, and snippets.

View darkliquid's full-sized avatar

Andrew Montgomery darkliquid

View GitHub Profile
dypsilon /
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
eddywashere / susy-non-semantic-grid.css
Last active December 14, 2015 11:38
A Non Semantic Grid with Susy
.col-1 {
width: 6.85484%;
float: left;
margin-right: 1.6129%;
display: inline;
.col-2 {
width: 15.32258%;
float: left;
trek / gist:4154434
Created November 27, 2012 14:18
original notes
backbone: what you'd normally use jquery plugins for, but with an inverted rendering process (js -> DOM instead of DOM -> js)
"islands of richness", jquery data callbacks main pattern.
other frameworks are building out from jQuery's central pattern of DOM selection and event callbacks.
fantastic pattern for adding behavior to documents, but we aren't writing documents.
domenic /
Last active March 31, 2024 14:07
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.
josephwecker /
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo:
# License: Public Domain.
# Author: Joseph Wecker, 2012
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead!
# (Thanks gioele)
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
ziadoz /
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
bmarini /
Created June 30, 2011 18:01
A good varnish config for a Rails app
# Summary
# 1. Varnish will poll the backend at /health_check to make sure it is
# healthy. If the backend goes down, varnish will server stale content
# from the cache for up to 1 hour.
# 2. Varnish will pass X-Forwarded-For headers through to the backend
# 3. Varnish will remove cookies from urls that match static content file
# extensions (jpg, gif, ...)
ahmednuaman / check_for_touch_device.js
Created November 16, 2010 15:55
A simple little script to check for a touch enabled device
var el = document.createElement( 'div' );
el.setAttribute( 'ontouchstart', 'return;' );
if ( typeof el.ontouchstart == 'function' )
// yay a touch device!

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.