This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
els = document.querySelectorAll('video,audio,embed,object,iframe'); | |
for (var i = 0; i < els.length; i++) { | |
el = els[i]; | |
el.parentNode.removeChild(el); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -f -L 4200:localhost:4243 pi@raspberrypi -N |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -ss 00:00:00 -i movie-name.mp4 -s 480x234 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=8 > movie-name.gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var $ = window.jQuery; | |
if ($) { | |
$('body').find('div,header').each(function () { | |
var $el = $(this); | |
if ($el.css('position') === 'fixed' && $el.css('top') === '0px') { | |
$el.css('position', 'relative'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
els = document.querySelectorAll('*'); | |
for (var i = els.length - 1; i >= 0; i--) { | |
var font = "Curlz MT" | |
, el = els[i] | |
; | |
el.style.fontFamily = font; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using @setTimeout or @setInterval will clear the timers on dispose | |
# Mixin, can be used with https://github.com/HubSpot/mixen | |
start = (type, args) -> | |
unless @disposed | |
method = window["set#{type}"] | |
timer = method.apply window, args | |
@timers[type].push timer | |
timer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var path = "http://www.example.com/", | |
containerEl = document.createElement("div"), | |
frameEl = document.createElement("iframe"), | |
styleEl = document.createElement("link"); | |
var sanitizePostMessage = function (e) { | |
if (e.origin === "http://www.example.com/") { | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resolve this promise when key on an object is truthy | |
# Optionally you can pass a timeout when to give up and how frequently to check | |
# Returns a promise resolved or rejected with the value given | |
whenTruthy = (key, obj = mediator, timeout = 60000, frequency = 100) -> | |
dfd = new $.Deferred | |
if obj[key] | |
dfd.resolve obj[key] | |
else | |
giveUp = setTimeout -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pv -ptre ubuntu-13.10-desktop-amd64.img | sudo dd of=/dev/rdisk2 bs=1m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout v2.0 | |
git tag -am "Adding v2.0.1 tag" v2.0.1 | |
git push origin v2.0.1 HEAD:refs/heads/v2.0 |