Skip to content

Instantly share code, notes, and snippets.

View jokeyrhyme's full-sized avatar

Ron Waldon-Howe jokeyrhyme

View GitHub Profile
@jokeyrhyme
jokeyrhyme / index.html
Last active November 10, 2016 04:49
ionic-deploy-plugin useCheckResponse
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@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 / 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 / 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 / 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

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 / 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
@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 / 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
## --------- ##
## Platform. ##
@jokeyrhyme
jokeyrhyme / wait-for.js
Last active June 29, 2019 08:38
JavaScript polling
/**
* @param {Function} condition a function that returns `true` or `false`
* @param {Number} [interval=197] the amount of time to wait between tests
* @param {Function} callback a function to invoke when the condition returns `true`
*/
function waitFor(condition, interval, callback) {
'use strict';
if (condition && condition()) {
callback();
} else {