Skip to content

Instantly share code, notes, and snippets.

@jcroft
jcroft / grid.sass
Created March 21, 2011 18:09
The grid component from my personal front-end framework. Brief demo here: http://jeffcroft.com/static/misc/grid_frameworks.mov
// REQUIRED VARS. Defaults to a 950px wide, 24-column grid that has 30px wide units and 10px wide
// gutters. If you do the fluid grid, then this 950/24/30/10px size will become the maximum size.
$grid_type: fixed !default
$grid_columns: 24 !default
$grid_column_width: 30 !default
$grid_gutter_width: 10 !default
// GENERATED VARS. You can ignore these.
$grid_full_width: $grid_columns * $grid_column_width + $grid_columns * $grid_gutter_width - $grid_gutter_width
$grid_column_width_percent: ($grid_column_width / $grid_full_width * 100) * 1%
@ryanseddon
ryanseddon / LICENSE.txt
Created June 6, 2011 04:51 — forked from 140bytes/LICENSE.txt
select DOM elements by any valid CSS selector
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bpainter
bpainter / arrows.scss
Created July 15, 2011 19:08
Sass mixin for arrows based on The Shapes of CSS from Chris Coyier http://css-tricks.com/examples/ShapesOfCSS/
// --------------------------------------------------------
// arrows
// --------------------------------------------------------
// $direction: top, left, right, bottom, top-left, top-right, bottom-left, bottom-right
// $color: hex, rgb or rbga
// $size: px or em
// @example
// .element{
// @include arrow(top, #000, 50px);
// }
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@ryanflorence
ryanflorence / cs-iife.coffee
Created September 29, 2011 19:10
CoffeeScript Immediately Invoked Function Expressions
increment = do ->
x = 0
->
x++
@matthieua
matthieua / gist:1311614
Created October 25, 2011 06:46
CoffeeScript Presentation Examples - Envato - 25/10/2011
# ::::::::: :::::::::: ::: ::: ::::::::
# :+: :+: :+: :+:+: :+:+: :+: :+:
# +:+ +:+ +:+ +:+ +:+:+ +:+ +:+ +:+
# +#+ +:+ +#++:++# +#+ +:+ +#+ +#+ +:+
# +#+ +#+ +#+ +#+ +#+ +#+ +#+
# #+# #+# #+# #+# #+# #+# #+#
# ######### ########## ### ### ########
# ::::::::::: ::::::::::: ::: ::: ::::::::::
# :+: :+: :+:+: :+:+: :+:
# +:+ +:+ +:+ +:+:+ +:+ +:+
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@bensmithett
bensmithett / gist:4030944
Last active September 12, 2020 12:44
Convert an image sequence to a 1080p video
brew install ffmpeg
ffmpeg -start_number 079 -y -r 30 -i "DSC_0%03d.JPG" -vf scale=1920:-1,crop=1920:1080 -vcodec libx264 -b:v 10000k -r 30 outputhd.m4v
# Optional bits
# -start_number: the first number in the sequence (default: 0)
# -y: overwrite output files without asking
# -r: input framerate (i.e. photos per second. The second -r is the output framerate)
# -i: input files. %03d = 3 digits (so this example would use DSC_0079.JPG - DSC_0999.JPG)
# Picked 10000k for the bitrate based on https://support.google.com/youtube/answer/1722171?hl=en