Skip to content

Instantly share code, notes, and snippets.

View pjrobertson's full-sized avatar

Patrick Robertson pjrobertson

View GitHub Profile
@pjrobertson
pjrobertson / install-composer.sh
Created February 18, 2016 09:48 — forked from matthewpizza/install-composer.sh
Install Composer on Webfaction
cd $HOME
ln -s `which php54` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php54
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile
@pjrobertson
pjrobertson / Toggle_Keyboard_Viewer
Created April 25, 2012 10:43
Toggle Keyboard Viewer for OS X
tell application "System Events"
if exists (process "Keyboard Viewer") then
click (process "Keyboard Viewer"'s window 1's buttons whose subrole is "AXCloseButton")
else
do shell script "/usr/local/bin/keyboardViewer"
end if
end tell
@pjrobertson
pjrobertson / gist:7727497
Created December 1, 2013 01:28
Memory_history for double freed object in sharedAddressBook
malloc_history Report Version: 2.0
Process: Quicksilver [17364]
Path: /private/tmp/QS/build/Debug/Quicksilver.app/Contents/MacOS/Quicksilver
Load Address: 0x100000000
Identifier: com.blacktree.Quicksilver
Version: 1.1.0:master:Debug (4008)
Code Type: X86-64
Parent Process: debugserver [17363]
Date/Time: 2013-12-01 09:19:26.898 +0800
@pjrobertson
pjrobertson / gist:7727462
Created December 1, 2013 01:21
sharedAddressBook crash / QS Contacts Plugin backtrace
lldb: bt all
thread #1: tid = 0xfc43, 0x00007fff89b5825a libsystem_malloc.dylib`__disk_stack_logging_log_stack + 767, queue = 'com.apple.main-thread
frame #0: 0x00007fff89b5825a libsystem_malloc.dylib`__disk_stack_logging_log_stack + 767
frame #1: 0x00007fff89b528a0 libsystem_malloc.dylib`malloc_zone_malloc + 107
frame #2: 0x00007fff89b53290 libsystem_malloc.dylib`malloc + 42
frame #3: 0x00007fff82ca46a3 libsystem_c.dylib`_vasprintf + 384
frame #4: 0x00007fff82c9c0fb libsystem_c.dylib`asprintf + 186
frame #5: 0x00007fff8b8fd525 CoreFoundation`-[NSObject(NSObject) __dealloc_zombie] + 85
frame #6: 0x00007fff8b7d8b9b CoreFoundation`-[__NSArrayM dealloc] + 379
@pjrobertson
pjrobertson / gist:6289687
Last active December 21, 2015 10:08
Changes to bpm detector to stop a bug for audio files with silent portions
import wave, array, math, time, argparse, sys
import numpy, pywt
from scipy import signal
import pdb
import matplotlib.pyplot as plt
def read_wav(filename):
#open file, get metadata for audio
try:
@pjrobertson
pjrobertson / gist:6112478
Created July 30, 2013 12:27
QS ARC crash
Process: Quicksilver [15721]
Path: /Applications/Quicksilver.app/Contents/MacOS/Quicksilver
Identifier: com.blacktree.Quicksilver
Version: 1.0.0:arc (4000)
Code Type: X86-64 (Native)
Parent Process: launchd [306]
User ID: 501
Date/Time: 2013-07-30 20:23:15.912 +0800
OS Version: Mac OS X 10.8.4 (12E55)
@pjrobertson
pjrobertson / gist:6112570
Created July 30, 2013 12:44
QS ARC crash
Process: Quicksilver [15721]
Path: /Applications/Quicksilver.app/Contents/MacOS/Quicksilver
Identifier: com.blacktree.Quicksilver
Version: 1.0.0:arc (4000)
Code Type: X86-64 (Native)
Parent Process: launchd [306]
User ID: 501
Date/Time: 2013-07-30 20:23:15.912 +0800
OS Version: Mac OS X 10.8.4 (12E55)
@pjrobertson
pjrobertson / gist:6076892
Last active December 20, 2015 05:18
PMS Crash
Process: Python [59285]
Path: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.5.6 (2.5.6a0)
Code Type: X86 (Native)
Parent Process: Plex Media Server [59284]
User ID: 501
PlugIn Path: /Users/USER/Library/Application Support/Plex Media Server/*/Framework.bundle/Contents/Resources/Platforms/MacOSX/i386/Frameworks/libxml2.2-osx.dylib
PlugIn Identifier: libxml2.2-osx.dylib
@pjrobertson
pjrobertson / gist:5964370
Last active December 19, 2015 13:48
Homebrew deps error

Command

src ⇒ brew deps --tree wireshark
wireshark
|- pkg-config
Error: undefined method `include?' for #<Dependency: "pkg-config" [:build]>
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formula.rb:368:in `canonical_name'
/usr/local/Library/Homebrew/formulary.rb:161:in `factory'
## Plugins built against commit bb8ec2ef2588e818e062af467d4d49945e102777 or later are 64 bit only. Set the QSVersion to ensure these plugins don't show up in the plugin updater
qsversion = info.get('QSRequirements',{}).get('version','')
if qsversion == '' or hex(qsversion) < 0x4001:
qsversion.setdefault('QSRequirements',{})['version'] = '4001'