Skip to content

Instantly share code, notes, and snippets.

View pmuellr's full-sized avatar
🌀
Software developer @ Elastic working on Kibana. Previously @ NodeSource, IBM.

Patrick Mueller pmuellr

🌀
Software developer @ Elastic working on Kibana. Previously @ NodeSource, IBM.
View GitHub Profile
@pmuellr
pmuellr / function-tracer.js
Created September 18, 2009 16:16
have your JavaScript methods trace their execution
//------------------------------------------------------------------------------
// JavaScript function tracer for "classes"
//------------------------------------------------------------------------------
// from: pmuellr@muellerware.org
// home: http://gist.github.com/189144
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// define our function tracer
//------------------------------------------------------------------------------
@pmuellr
pmuellr / gist:209216
Created October 13, 2009 12:49
Add a "Add to Google" button to Safari's RSS reader
<!-- ======================================================
Add a "Add to Google" (Reader or Homepage) icon to Safari's
RSS reader.
The file to edit is this one:
/System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/Resources/Feed.html
Make a copy before you continue. I suggest Feed-original.html
in the same directory.
@pmuellr
pmuellr / run-when-changed.py
Created November 23, 2009 06:16
run-when-changed.py
#!/usr/bin/env python
#-----------------------------------------------------------------------------
# The MIT License
#
# Copyright (c) 2009, 2010 Patrick Mueller
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@pmuellr
pmuellr / test.js
Created December 2, 2009 20:09
JavaScript traceback sample
// sample code
function legend(message) {
var dashes = new Array(60).join("-")
console.log(dashes)
console.log(message)
console.log(dashes)
console.log("")
}
@pmuellr
pmuellr / progit-to-html.py
Created February 11, 2010 18:50
convert the progit source to HTML
#!/usr/bin/env python
# convert the pro git book into HTML,
# suitable for reading in Dropbox on the iPhone
import os
import re
import sys
import base64
import subprocess
tell application "Safari"
activate
set the bounds of the first window to {0, 0, 1280, 720}
end tell
@pmuellr
pmuellr / ct2html.py
Created August 10, 2010 22:50
quick little script to convert a colloquy transcript to HTML, kinda
#!/usr/bin/env python
import os
import sys
#-----------------------------------------------------------------------------
def main():
iFileNames = sys.argv[1:]
for iFileName in iFileNames:
@pmuellr
pmuellr / FluidBadgeUpdaterForLotusNotes.js
Created November 16, 2010 14:03
userscript for Fluid for Lotus Notes web version to update dock badge with inbox counter
// ==UserScript==
// @name NotesInboxCounter
// @namespace http://fluidapp.com
// @description Updates the dock back with Inbox count for Lotus Notes
// @include *
// @author Patrick Mueller
// ==/UserScript==
(function () {
@pmuellr
pmuellr / unzip-recurse.py
Created November 19, 2010 15:41
tool to recursively unzip .zip and .jar files
#!/usr/bin/env python
import os
import sys
import subprocess
#-----------------------------------------------------------------------------
def main():
fileNames = sys.argv[1:]
@pmuellr
pmuellr / epub-to-kindle.html
Created December 16, 2010 11:41
Drop this file in an expanded .epub, it may create a page which can be saved as PDF and displayed nicely on a Kindle.
<!doctype html>
<meta charset="utf-8" />
<!--
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Patrick Mueller
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
#-------------------------------------------------------------------------------
-->