Shell snippet that prepends a nice to a command's output.
For example, here's the (snipped) output of vagrant provision
:
Successfully installed bundler-1.3.5
1 gem installed
Using rmagick (2.13.2)
# prevents error: could not build the map_hash, you should increase map_hash_bucket_size: 64
map_hash_bucket_size 192;
map $http_user_agent $bad_bot {
default 0;
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36" 1;
}
# must be in http context
I made this gist in the course of experimenting with backbone.js.
See http://bl.ocks.org/dergachev/5733254 or http://plnkr.co/edit/gist:5733254?p=preview to play with it.
Safely embedding code snippets in HTML.
See http://bl.ocks.org/dergachev/5732338 for preview, or http://jsfiddle.net/dergachev/BMjHS/ to tweak.
This is the javascript powering http://shortcutfoo.com De-minified using jsbeautifier.org
Bookmarklet to display all accesskey-enabled links on a page. To install, visit http://bl.ocks.org/dergachev/5659784
// works on selected text | |
var selection = window.getSelection().toString(); | |
if (selection) { | |
selection = selection.match(/[^\r\n]+/g) | |
.map(function(a) { return "* " + a; }). | |
join("\n"); | |
prompt("Here's your markdown:", selection); | |
} |
Notes from Promet Chef talk at Drupalcon Portland
This is what they use.