Skip to content

Instantly share code, notes, and snippets.

View illepic's full-sized avatar

Christopher Bloom illepic

View GitHub Profile
@lucasdinonolte
lucasdinonolte / gist:4016361
Created November 5, 2012 09:45
Copy current git branch to clipboard
git branch | grep "*" | awk '{ print $2 }' | pbcopy
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 23, 2024 18:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@sanguis
sanguis / settings.php
Last active September 27, 2015 11:47
Common Drupal Developer environment settings.php vars
//if (module_exists("stage_file_proxy")) $conf['stage_file_proxy_origin'] = "http://www.url.com";
// Disable (page) caching
$conf['cache'] = 0;
// Output errors to screen (and log)
$conf['error_level'] = 1;
// Disable aggregation of js and css
$conf['preprocess_js'] = FALSE;
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}

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