Skip to content

Instantly share code, notes, and snippets.

@devd
devd / jquery-security-patch.js
Created September 23, 2015 16:06
jQuery Security Patch
/* Original code.
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*/
// This is designed to be used via RequireJS, but you can also just copy the code inside and execute it after you load jQuery.
// TODO(devd): modify this code to automatically detect absence of AMD environment and do the right thing.
define(["jquery"], function(jQuery) {
jQuery.fn.domManip = function (args, callback, allowIntersection) {
@devd
devd / keybase.md
Created September 22, 2014 22:39
keybase.md

Keybase proof

I hereby claim:

  • I am devd on github.
  • I am devd (https://keybase.io/devd) on keybase.
  • I have a public key whose fingerprint is D3D9 2B01 A113 AF5E B1DE A64E F3B3 16D5 FCB3 FA01

To claim this, I am signing this object:

@devd
devd / kindle-delete
Created June 24, 2013 02:29
Simple script to go through your Kindle list of documents and delete stuff.
(function () {
'use strict';
var todelete = [],
a = document.getElementsByClassName('rowHeaderCollapsed'),
i = 0,
name = "",
key = "";
for (i = 0; i < a.length; i = i + 1) {
name = ((a[i]).getElementsByClassName('headerTitle')[0]).textContent;
@devd
devd / getfullcontents.pl
Created November 15, 2012 20:25
LaTeX Multiple Files to One File
use strict;
use warnings;
getcontent($ARGV[0]);
use strict;
use warnings;
sub getcontent{
my $filename = shift;
my $line;
@devd
devd / ext2csp.pl
Last active July 12, 2016 22:31
Simple Tool to maybe rewrite extensions to be CSP compatible
#Run this on Extension Source code to make it inline-script-less
#perl ext2csp.pl <extdir>;
#where extdir is the directory with the manifest.json.
#This will make a inplace change: make a copy if you want it to work on a copy.
use strict;
use warnings;
use HTML::Parser ();
@devd
devd / gist:958007
Created May 5, 2011 21:32
Simple perl script to titlecase all upper case tags in your mp3 collection
#!/usr/bin/perl
use strict;
use warnings;
use MP3::Tag;
use File::Util;
my %hash=();
#use constant and not argument so that user has to