Skip to content

Instantly share code, notes, and snippets.

View jokeyrhyme's full-sized avatar

Ron Waldon-Howe jokeyrhyme

View GitHub Profile
@jokeyrhyme
jokeyrhyme / jquery.ajax.trimreponses.js
Created February 18, 2014 00:28
override jQuery.ajax to auto-trim responseText
(function () {
'use strict';
var oldFn;
oldFn = $.ajax;
$.ajax = function () {
var dfrd = new $.Deferred();
oldFn.apply($, arguments).then(function (data, status, xhr) {
if (!!xhr.responseText) {
data = $.trim(xhr.responseText);
xhr.responseText = data;
@jokeyrhyme
jokeyrhyme / config.log
Created April 29, 2014 06:05
errors compiling PHP 5.5.11 with php-build
This file has been truncated, but you can view the full file.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-config-file-path=/opt/php/5.5.11/etc --with-config-file-scan-dir=/opt/php/5.5.11/etc/conf.d --prefix=/opt/php/5.5.11 --libexecdir=/opt/php/5.5.11/libexec --without-pear --with-gd --enable-sockets --with-jpeg-dir=/usr --with-png-dir=/usr --enable-exif --enable-zip --with-zlib --with-zlib-dir=/usr --with-kerberos --with-openssl --with-mcrypt=/usr --enable-soap --enable-xmlreader --with-xsl --enable-ftp --enable-cgi --with-curl=/usr --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-shmop --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite --enable-pcntl --with-readline --enable-mbstring --disable-debug --enable-fpm --enable-bcmath --disable-phar
## --------- ##
@jokeyrhyme
jokeyrhyme / Dockerfile
Last active August 29, 2015 14:03
Docker and Vagrant
FROM ubuntu:14.04
MAINTAINER Ron Waldon <jokeyrhyme@gmail.com>
RUN apt-get -y update
RUN apt-get -y install build-essential ruby2.0 ruby2.0-dev libxml2-dev libxslt-dev
WORKDIR /usr/bin
RUN ln -sf ruby2.0 ruby
@jokeyrhyme
jokeyrhyme / Docker+Jekyll+BTSync.md
Last active August 29, 2015 14:03
Docker + Jekyll via BitTorrent Sync, with boot2docker
docker run -d -p ::3000/udp -p ::8888 --name btsync -v /mnt/blog jokeyrhyme/btsync
docker ps
  • note the port mapped to btsync:8888
  • if not using boot2docker, you should specify -p 127.0.0.1::8888 for security
boot2docker ip

Keybase proof

I hereby claim:

  • I am jokeyrhyme on github.
  • I am jokeyrhyme (https://keybase.io/jokeyrhyme) on keybase.
  • I have a public key whose fingerprint is 191C 5FC6 2DE0 94A4 D6BD 5A99 B150 7111 F96E C3B1

To claim this, I am signing this object:

@jokeyrhyme
jokeyrhyme / toggle-2g.sh
Created January 9, 2015 00:47
toggle Android Emulator 2G network limits over and over
while true
do
echo "network speed full" | nc localhost 5554
sleep 1
echo "network speed gsm" | nc localhost 5554
sleep 1
done
@jokeyrhyme
jokeyrhyme / index.js
Created January 15, 2015 03:22
Hapi.js Authentication test
'use strict';
// 3rd-party modules
var Hapi = require('hapi');
// this module
var server = new Hapi.Server();
@jokeyrhyme
jokeyrhyme / works-1.js
Last active August 29, 2015 14:13
Hapi.js versus asynchronous authentication schemes
'use strict';
// Node.js built-ins
var http = require('http');
// 3rd-party modules
var Hapi = require('hapi');
@jokeyrhyme
jokeyrhyme / ajax-spy.js
Last active August 29, 2015 14:14
log all arguments passed to jQuery.ajax()
(function () {
'use strict';
var oldAjax = $.ajax;
$.ajax = function () {
if (window.console && console.log) {
console.log(arguments);
}
return oldAjax.apply($, arguments);
};
}());
@jokeyrhyme
jokeyrhyme / browser.log
Created June 23, 2012 07:42
Android logcat for CyanogenMod 9 nightly-20120622 Browser crash
D/dalvikvm( 222): GC_CONCURRENT freed 2506K, 33% free 11982K/17795K, paused 4ms+8ms
D/dalvikvm( 222): GC_EXPLICIT freed 200K, 34% free 11874K/17795K, paused 6ms+5ms
I/ActivityManager( 222): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.browser/.BrowserActivity} from pid 615
I/ActivityManager( 222): Start proc com.android.browser for activity com.android.browser/.BrowserActivity: pid=4436 uid=10003 gids={3003, 1015}
D/OpenGLRenderer( 615): Flushing caches (mode 1)