Skip to content

Instantly share code, notes, and snippets.

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 Sep 18, 2009
have your JavaScript methods trace their execution
View function-tracer.js
//------------------------------------------------------------------------------
// JavaScript function tracer for "classes"
//------------------------------------------------------------------------------
// from: pmuellr@muellerware.org
// home: http://gist.github.com/189144
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// define our function tracer
//------------------------------------------------------------------------------
@pmuellr
pmuellr / gist:209216
Created Oct 13, 2009
Add a "Add to Google" button to Safari's RSS reader
View gist:209216
<!-- ======================================================
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.
View 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 Dec 2, 2009
JavaScript traceback sample
View test.js
// 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 Feb 11, 2010
convert the progit source to HTML
View progit-to-html.py
#!/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
View Resize-Safari-1280x720.scpt
tell application "Safari"
activate
set the bounds of the first window to {0, 0, 1280, 720}
end tell
@pmuellr
pmuellr / ct2html.py
Created Aug 10, 2010
quick little script to convert a colloquy transcript to HTML, kinda
View ct2html.py
#!/usr/bin/env python
import os
import sys
#-----------------------------------------------------------------------------
def main():
iFileNames = sys.argv[1:]
for iFileName in iFileNames:
@pmuellr
pmuellr / FluidBadgeUpdaterForLotusNotes.js
Created Nov 16, 2010
userscript for Fluid for Lotus Notes web version to update dock badge with inbox counter
View FluidBadgeUpdaterForLotusNotes.js
// ==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 Nov 19, 2010
tool to recursively unzip .zip and .jar files
View unzip-recurse.py
#!/usr/bin/env python
import os
import sys
import subprocess
#-----------------------------------------------------------------------------
def main():
fileNames = sys.argv[1:]
@pmuellr
pmuellr / epub-to-kindle.html
Created Dec 16, 2010
Drop this file in an expanded .epub, it may create a page which can be saved as PDF and displayed nicely on a Kindle.
View epub-to-kindle.html
<!doctype html>
<meta charset="utf-8" />
<!--
#-------------------------------------------------------------------------------
# Copyright (c) 2010 Patrick Mueller
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
#-------------------------------------------------------------------------------
-->
You can’t perform that action at this time.