Skip to content

Instantly share code, notes, and snippets.

View illepic's full-sized avatar

Christopher Bloom illepic

View GitHub Profile

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

@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"); }
}
@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;
@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

@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
@lucasdinonolte
lucasdinonolte / gist:4016361
Created November 5, 2012 09:45
Copy current git branch to clipboard
git branch | grep "*" | awk '{ print $2 }' | pbcopy
@agentolivia
agentolivia / panesandblocks.inc
Last active May 26, 2016 17:02 — forked from anonymous/gist:5745928
Example of CTools Style Plugin dot inc file.
<?php
/**
* Defines a style plugin
*
* - panesandblocks: corresponds to directory name of plugin
* - render pane: the suffix of the theme function for the pane (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_pane",
* the value of "render pane" is "panesandblocks_render_pane".
* - render region: the suffix of the theme function for the region (without "theme_").
* - Example: If the function name is "theme_panesandblocks_render_region",
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@matthewpizza
matthewpizza / install-composer.sh
Created February 13, 2014 03:55
Install Composer on Webfaction
cd $HOME
ln -s `which php54` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php54
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];