Skip to content

Instantly share code, notes, and snippets.

@jgebhardt
jgebhardt / gist:5381120
Created April 14, 2013 02:28
Using wget to download MViz pics
wget --recursive --span-hosts --no-directories --no-dns-cache --inet4-only --page-requisites --accept png,jpg,jpeg,gif --timestamping --wait=0.25 --domains=mv122011.wordpress.com,mv122011.files.wordpress.com http://mv122011.wordpress.com/
@jgebhardt
jgebhardt / spirograph.paper.js
Created April 12, 2012 04:44
paper.js spirograph demo å la https://vimeo.com/31933085
<!DOCTYPE html>
<html>
<head>
<!-- Load the Paper.js library -->
<script type="text/javascript" src="js/paper.js"></script>
<!-- Define inlined PaperScript associate it with myCanvas -->
<script type="text/paperscript" canvas="myCanvas">
/* config */
@jgebhardt
jgebhardt / restoreAutocomplete.url
Created March 7, 2012 20:34
Bookmarklet to remove autocomplete=off in form tags
javascript:(function(){formMagic={};formMagic.fs=document.forms,formMagic.i=0;while(formMagic.i<formMagic.fs.length){formMagic.fs[formMagic.i].removeAttribute('autocomplete');formMagic.i++}})();
@jgebhardt
jgebhardt / gist:1676679
Created January 25, 2012 15:06
hotfix to manually generate MODx resource URIs from the tree after updating
BEGIN TRANSACTION;
WITH builder AS(
SELECT id , alias , parent, CAST('' AS VARCHAR(765)) [path], 0 [iter], parent [top], CAST('root' AS VARCHAR(300)) [hierarchy]
FROM dbo.modx_site_content parent
UNION ALL
SELECT child.id, child.alias, parent.parent, CAST(path AS VARCHAR(255)) + CAST('/' AS VARCHAR(255)) + CAST(child.alias AS VARCHAR(255)) [path], iter + 1 [iter], child.parent [top], CAST(hierarchy AS VARCHAR(100)) + CAST('/' AS VARCHAR(100)) + CAST(child.id AS VARCHAR(100)) [hierarchy]