Skip to content

Instantly share code, notes, and snippets.

$(function() {
// add/show/hide .add-note button on hover
$('.module-body').hover(
function() {
var myel = $('> button.add-note', this).length ? $('> button.add-note', this) : $('<button class="btn btn-small add-note">Add Note</button>').appendTo(this);
$('.add-note', this).show();
},
function() {
$('.add-note', this).hide();
}
@todoubled
todoubled / hack.sh
Created April 2, 2012 14:11 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@todoubled
todoubled / sc-dl.js
Created March 7, 2012 15:58 — forked from pheuter/sc-dl.js
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);
@todoubled
todoubled / Procfile
Created November 26, 2011 16:58 — forked from mojodna/Procfile
Getting Kue working on Heroku
web: node app.js
worker: node consumer.js
@todoubled
todoubled / bookmarklet.js
Created June 18, 2011 16:30 — forked from kn0ll/bookmarklet.js
advanced bookmarklet template
javascript:(function() {
if(!window.your_bookmarklet) {
var doc = document,
js = doc.createElement('script');
js.type = 'text/javascript';
js.src = 'loader.js';
js.async = true;