Skip to content

Instantly share code, notes, and snippets.

@stawecki
stawecki / todogen.sh
Created September 12, 2011 21:40
"TODO:" comment to HTML generator in bash (grep, awk)
#!/bin/bash
OUTFILE="TODO.html"
echo > $OUTFILE
echo "<html><head><style>li{padding:4px;}</style></head><body>" >> $OUTFILE
echo "<h1>${PWD##*/}</h1>" >> $OUTFILE # Header - Current directory
echo "<h2><tt>TODO:</tt></h2><ul>" >> $OUTFILE
grep -r -i "TODO" ./ | grep "//" > tododoc.temp
@stawecki
stawecki / webkitscrape.html
Created May 14, 2011 23:14
Sample WebKit Remote Control with JavaScript via Remote Debug script
<script>
var socket;
var seqNo = 1;
var seqCallback = [];
var remoteOnChange;
var remoteOnLoad;
var remoteURL;
function remoteEval(scriptString,callback) {