Skip to content

Instantly share code, notes, and snippets.

@simongcc
simongcc / ramdisk.sh
Created October 3, 2017 07:49 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@simongcc
simongcc / best-localStorage-polyfill-evar.js
Created July 26, 2017 08:10 — forked from juliocesar/best-localStorage-polyfill-evar.js
This is the best localStorage polyfill in the world
// I mean, seriously, localStorage is supported even by your mum. How about instead of
// casing the feature out, you give users in-memory (stale) storage instead?
// If they close your application, they deserve to lose data anyway.
// if (!('localStorage' in window)) {
if (!Modernizr.localstorage) {
window.localStorage = {
_data : {},
setItem : function(id, val) { return this._data[id] = String(val); },
getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; },
@simongcc
simongcc / 0_reuse_code.js
Created April 27, 2017 17:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@simongcc
simongcc / .block
Created April 16, 2017 03:31 — forked from mbostock/.block
The Gist to Clone All Gists
license: gpl-3.0
@simongcc
simongcc / config.rb
Last active April 25, 2017 04:36 — forked from yatil/config.rb
My standard config.rb for compass
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
# You can select your preferred output style