Skip to content

Instantly share code, notes, and snippets.

function addBlankTargetForLinks () {
$('a[href^="http"]'||'a[href^="https"]').each(function(){
$(this).attr('target', '_blank');
});
}
$(document).bind('DOMNodeInserted', function(event) {
addBlankTargetForLinks();
});
@fike
fike / sqlite2pg.sh
Last active December 14, 2015 12:58 — forked from eclubb/sqlite2pg.sh
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3