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 / redmonk-weekly.py
Created January 28, 2011 17:39
produce a more instapaper-able rollup of RedMonk blogs
#!/usr/bin/env python
# coding=utf-8
import sys
import time
import feedparser
feeds = [
[u"Michael Coté", u"http://www.redmonk.com/cote/", u"http://feeds.feedburner.com/PeopleOverProcess"],
[u"Tom Raftery", u"http://greenmonk.net/", u"http://greenmonk.net/feed/"],
@pmuellr
pmuellr / override-addEventListener.html
Created March 4, 2011 16:35
test to see what we can do when we override addEventListener
<!--
======================================================================
Example trying to show hooking addEventListener to see if we can
capture error state for errors that occur in the handler.
Basically, we can capture that an error occurred, and get the
error message, and the event and object that was fired that
caused code to run that caused the error. But no stack trace
or line information.
@pmuellr
pmuellr / getStylesForNode.json
Created April 1, 2011 13:10
for version of Web Inspector I'm using for weinre
{
"seq": 11,
"domain": "CSS",
"success": true,
"data": {
"styles": {
"inlineStyle": {
"styleId": {
"styleSheetId": "3",
"ordinal": 0
@pmuellr
pmuellr / amd-loader-for-node.js
Created May 23, 2011 13:58
a module for node which installs a compiler for .amd files
//----------------------------------------------------------------------------
// Copyright (c) 2011 Patrick Mueller
//
// The MIT License - see: http://www.opensource.org/licenses/mit-license.php
//----------------------------------------------------------------------------
var fs = require("fs")
// adds a new extension compiler, leave if not supported
if (!require.extensions) {
@pmuellr
pmuellr / amd-define-for-node.js
Created May 24, 2011 14:45
a module for node which installs an AMD-compliant define() function
//----------------------------------------------------------------------------
// Copyright (c) 2011 Patrick Mueller
//
// The MIT License - see: http://www.opensource.org/licenses/mit-license.php
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// adds an AMD-compliant define() function to the global object
//
// specifically for node, dependent on:
@pmuellr
pmuellr / Makfile.android.template
Created May 27, 2011 13:52
skeletal makefile for phonegap android
#
# PhoneGap is available under *either* the terms of the modified BSD license *or* the
# MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
#
# Copyright (c) 2011, IBM Corporation
#
#-------------------------------------------------------------------------------
help:
@echo make targets available:
@pmuellr
pmuellr / gist:1004413
Created June 2, 2011 13:24
BBEdit Language Module for CoffeeScript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
BBEdit Language Module for CoffeeScript
Put this file in
~/Library/Application Support/BBEdit/Language Modules
or equivalent.
Based off of the examples shipped in the BBEdit SDK.
@pmuellr
pmuellr / weinre-ext.dot.js
Created July 1, 2011 22:29
first pass, not working, of "local" weinre extensions via dotjs
//------------------------------------------------------------------------------
// dotjs extension to install extensions in weinre
//------------------------------------------------------------------------------
;(function() {
//------------------------------------------------------------------------------
// this function will string-ized and included in a script element that
// will be injected into the weinre client window
@pmuellr
pmuellr / test-13.html
Created July 18, 2011 13:37
test for weinre bug 13
<style>
.test{
color: green; /* this one is visible in the Styles side panel */
}
@media only screen and (min-width: 768px){
.test{
color: red; /* this rule isn't visible in the Style side panel. */
}
}
@pmuellr
pmuellr / get-nc-state-park-info.sh
Created July 23, 2011 01:11
download all the NC State Park maps and brochures
#!/bin/sh
mkdir maps
wget http://www.ncparks.gov/Visit/parks/cabe/pics/parkmap.pdf -O maps/Carolina_Beach.pdf
wget http://www.ncparks.gov/Visit/parks/cacr/pics/parkmap.pdf -O maps/Carvers_Creek.pdf
wget http://www.ncparks.gov/Visit/parks/chro/pics/parkmap.pdf -O maps/Chimney_Rock.pdf
wget http://www.ncparks.gov/Visit/parks/clne/pics/parkmap.pdf -O maps/Cliffs_of_the_Neuse.pdf
wget http://www.ncparks.gov/Visit/parks/crmo/pics/parkmap.pdf -O maps/Crowders_Mountain.pdf
wget http://www.ncparks.gov/Visit/parks/disw/pics/parkmap.pdf -O maps/Dismal_Swamp.pdf