Skip to content

Instantly share code, notes, and snippets.

View darkliquid's full-sized avatar

Andrew Montgomery darkliquid

View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@eddywashere
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
trek / gist:4154434
Created November 27, 2012 14:18
original notes
https://twitter.com/dagda1/status/231016636847648769
https://twitter.com/garybernhardt/status/227881347346219008/
http://ianstormtaylor.com/rendering-views-in-backbonejs-isnt-always-simple/
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
domenic / promises.md
Last active March 8, 2024 18:31
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
josephwecker / new_bashrc.sh
Created August 11, 2012 04:36
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful. Now a repo: https://github.com/josephwecker/bashrc_dispatch
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# -- DEPRICATED --
# This gist is slow and is missing .bashrc_once
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch
# (Thanks gioele)
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
@ziadoz
ziadoz / awesome-php.md
Last active March 4, 2024 08:42
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@bmarini
bmarini / default.vcl.pl
Created June 30, 2011 18:01
A good varnish config for a Rails app
# https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html
# https://www.varnish-cache.org/trac/wiki/VCLExamples
# 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
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.

Variables