Skip to content

Instantly share code, notes, and snippets.

View funkatron's full-sized avatar

Ed Finkler funkatron

View GitHub Profile
@funkatron
funkatron / find_apple_server_processes.sh
Created November 30, 2013 01:50
Sometimes bonjour/mDNS and Apple Screen Sharing seem to hang/die, so the machine doesn't show up in the Finder of other computers on the same network. I found that killing all the prcesses that come up in this ps -ax | grep fixes it. At least this time.
ps -ax | grep AppleVNCServer
@funkatron
funkatron / jim_on_brian.txt
Created November 26, 2013 02:57
My brother Jim wrote this about Brian, our brother who passed away recently.
Thank you--long overdue--to all of the kind folks who offered their condolences for my brother Brian passing away recently.
It's been a week since he was laid to rest. He'd had liver disease for about two years, the result of an infection that affected most of the organs in his abdomen and for which he delayed seeing a doctor until he'd become swollen all over.
Brian was my brother closest in age (I have two other brothers, Mike and Ed). We shared a bedroom until I was about 12, we shared an apartment when I graduated from college, and Noreen and I shared our home with Brian for several months in the early 1990's. He ended up developing a close friendship with my long-time best friend Ed Bryan and shared an apartment with Ed for a year or so. Ed was my Best Man, I was Brian's Best Man at his first wedding, and Brian was Ed's Best Man.
Even though he lived just a few miles away and was my only sibling in PA, after the mid 1990's there were lots of times where he and I weren't in contact for months because
@funkatron
funkatron / brian_obit.md
Created November 13, 2013 13:51
My brother's obituary

Brian John Finkler
November 13, 2013
Williamsport Sun-Gazette

Brian John Finkler, 49, of 131 E. Water St., Muncy, died Wednesday, Nov. 6, 2013, at Geisinger Medical Center, Danville.

Born May 23, 1964, in Philadelphia, he was a son of Stewart S. and Marian (Neu) Finkler, of St. Joseph, Mich.

Brian was a 1982 graduate of Muncy High School. He worked for more than 25 years at Carey-McFall/Springs Window Fashion, Montgomery, retiring in 2010.

@funkatron
funkatron / Vagrantfile
Created September 23, 2013 17:15
Vagrantfile for python web app dev VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILEDIR=File.expand_path(File.dirname(__FILE__))
VAGRANTFILE=File.basename(__FILE__)
VM_IP="192.168.33.10"
SHARE_GUEST="/var/opt/www"
SHARE_HOST="var-opt-www"
Vagrant::Config.run do |config|
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_log = /tmp/xdebug.log
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_autostart=1
@funkatron
funkatron / appleid_phishing_email.txt
Created August 28, 2013 14:32
Source of a really good phishing email I received. Screenshots: http://img.spz.im/g6VYo.png http://img.spz.im/yezPc.png
Delivered-To: REDACTED
Received: by 10.216.66.137 with SMTP id h9csp244750wed;
Wed, 28 Aug 2013 07:25:59 -0700 (PDT)
X-Received: by 10.68.236.168 with SMTP id uv8mr27888683pbc.124.1377699958214;
Wed, 28 Aug 2013 07:25:58 -0700 (PDT)
Return-Path: <REDACTED>
Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [2607:f8b0:400e:c02::234])
by mx.google.com with ESMTPS id zo4si20272538pbc.342.1969.12.31.16.00.00
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
Wed, 28 Aug 2013 07:25:58 -0700 (PDT)
@funkatron
funkatron / bleach_strip.py
Created July 31, 2013 16:45
strip HTML using Bleach python lib
import bleach
def strip_html(html_str):
"""
a wrapper for bleach.clean() that strips ALL tags from the input
"""
tags = []
attr = {}
styles = []
strip = True
@funkatron
funkatron / boris_repl_ughhhhhh.txt
Created March 20, 2013 00:43
Where I immediately run into the limitations of PHP
[1] boris> require 'vendor/autoload.php';
[2] boris> use Respect\Validation\Validator as v;
PHP Parse error: syntax error, unexpected 'use' (T_USE) in /Users/coj/bin/boris/lib/Boris/EvalWorker.php(103) : eval()'d code on line 1
PHP Stack trace:
PHP 1. {main}() /Users/coj/bin/boris/bin/boris:0
PHP 2. Boris\Boris->start() /Users/coj/bin/boris/bin/boris:9
PHP 3. Boris\EvalWorker->start() /Users/coj/bin/boris/lib/Boris/Boris.php:95
Parse error: syntax error, unexpected 'use' (T_USE) in /Users/coj/bin/boris/lib/Boris/EvalWorker.php(103) : eval()'d code on line 1
@funkatron
funkatron / testable.html
Last active December 15, 2015 00:09
Showing a refactor to improve testability of a JavaScript app's global class. Before, we were doing a bunch of things inside one scope, and doing all the setup + kickstarting the app in the same scope. By breaking things out into separate chunks via function definitions, we can test each piece of setup individually without kickstarting the entir…
<script type="text/javascript" src="/static/js/testable_app_run.js"></script>
@funkatron
funkatron / encodeURIComponent.py
Created March 8, 2013 16:47
Maybe this works? Can't remember where I found it.
urllib.quote(unicode(uri_component_str).encode('utf-8'), safe='~()*!.\'')