Skip to content

Instantly share code, notes, and snippets.

View terinjokes's full-sized avatar

Terin Stock terinjokes

View GitHub Profile
@terinjokes
terinjokes / RVRenderHandler+PPSlowTransition.m
Created November 18, 2011 19:29
class_getInstanceMethod returns NULL
@implementation RVRenderHandler (PPSlowTransition)
+ (void) initialize
{
Method method = nil;
method = class_getInstanceMethod([self class], @selector(setTransitionTime:));
method->method_name = @selector(_original_setTransitionTime:);
// the above works
@terinjokes
terinjokes / gist:1378193
Created November 19, 2011 00:28
dtracing RVRenderHandler:*ransition*:entry {} | RVRenderHandler:*ransition*:return {}
TheMacBookPro:~ terin$ sudo dtrace -s ~/objc_calls.d -F -p 8330 -v
dtrace: script '/Users/terin/objc_calls.d' matched 18 probes
Stability attributes for script /Users/terin/objc_calls.d:
Minimum Probe Description Attributes
Identifier Names: Unstable
Data Semantics: Unstable
Dependency Class: Common
@terinjokes
terinjokes / gist:1401814
Created November 28, 2011 20:07
tyrs backtrace
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/home/terin/tyrs/src/tyrs/update.py", line 34, in run
self.update_timeline()
File "/home/terin/tyrs/src/tyrs/update.py", line 55, in update_timeline
self.api.update_timeline(t)
File "/home/terin/tyrs/src/tyrs/tweets.py", line 208, in update_timeline
statuses = self.retreive_statuses(timeline)
File "/home/terin/tyrs/src/tyrs/tweets.py", line 232, in retreive_statuses
@terinjokes
terinjokes / gist:1440131
Created December 6, 2011 21:42
Fortune Web API
<?php
# A server I use doesn't have fortune installed, so created this small script to fetch one from a web api and display it on login
$json = file_get_contents("http://www.iheartquotes.com/api/v1/random?source=prog_style+osp_rules+math+humorix_misc+oneliners+riddles&format=json", "r");
$json = json_decode($json);
echo wordwrap($json->quote);
?>
@terinjokes
terinjokes / bmdclient
Created January 14, 2012 15:18
bmdclient/ffmpeg
TheMacBookPro:2012-01-14 terin$ ~/Downloads/bmdclient -verbose
Parameters:
Destination File: atem.ts
Source Window:
fps: 25
srcx: 0
srcy: 0
srcw: 1920
This equipment has been tested and found to comply with the rules for
TV bands devices, pursuant to part 15 of the FCC rules. These rules are
designed to provide reasonable protection against harmful interference.
This equipment generates, uses and can radiate radio frequency energy
and, if not installed and used in accordance with the instructions, may
cause harmful interference to radio communications. If this equipment
does cause harmful interference to radio or television reception, which
can be determined by turning the equipment off and on, the user is
encouraged to try to correct the interference by one or more of the
following measures:
@terinjokes
terinjokes / gist:1944688
Created February 29, 2012 21:47
Homebrew MariaDB 5.3.5 error
==> make install
Making install in .
make abi_headers="include/mysql.h include/mysql/client_plugin.h include/mysql/plugin_auth.h" do_abi_check
set -ex; \
for file in include/mysql.h include/mysql/client_plugin.h include/mysql/plugin_auth.h; do \
/usr/bin/clang -E -nostdinc -dI -DMYSQL_ABI_CHECK \
-I./include \
-I./include/mysql \
-I./sql \
-I./include \
config interface
option interface 'lan'
config prefix
option interface 'lan'
config route
option interface 'lan'
config rdnss
@terinjokes
terinjokes / gist:2791991
Created May 26, 2012 03:28
brew --config
TheMacBookPro:~ terin$ brew --config
HOMEBREW_VERSION: 0.9
HEAD: 3f070ef24522adf624d2ecb11c5596dcc648e9a4
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.7.4
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
@terinjokes
terinjokes / gist:3854368
Created October 8, 2012 19:20
error compiling texinfo
make: Entering directory `/mnt/clfs/sources/texinfo-4.13/tools'make all-recursivemake[1]: Entering directory `/mnt/clfs/sources/texinfo-4.13/tools'
Making all in lib
make[2]: Entering directory `/mnt/clfs/sources/texinfo-4.13/tools/lib'make[2]: Nothing to be done for `all'.make[2]: Leaving directory `/mnt/clfs/sources/texinfo-4.13/tools/lib'
Making all in info
make[2]: Entering directory `/mnt/clfs/sources/texinfo-4.13/tools/info'
make all-am
make[3]: Entering directory `/mnt/clfs/sources/texinfo-4.13/tools/info'
gcc -g -O2 -o ginfo dir.o display.o dribble.o echo-area.o filesys.o footnotes.o gc.o indices.o info-utils.o info.o infodoc.o infomap.o m-x.o man.o nodemenu.o nodes.o search.o session.o signals.o terminal.o tilde.o variables.o window.o doc.o ../lib/libtxi.a ../gnulib/lib/libgnu.a
terminal.o: In function `terminal_end_using_terminal':
/mnt/clfs/sources/texinfo-4.13/info/terminal.c:166: undefined reference to `tputs'