Skip to content

Instantly share code, notes, and snippets.

View raldred's full-sized avatar

Rob Aldred raldred

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.13.2/TweenMax.min.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.map {
position: relative;
@raldred
raldred / TweenMax.SVGJSPlugin.js
Last active December 30, 2015 03:28
svg.js plugin for TweenMax, heavily based on the Raphael plugin.
/*!
* VERSION: 0.0.1
* DATE: 2013-12-03
*
* @description: Plugin to manipulate transform properties of SVGJS objects, heavily based on the RaphaelPlugin
*
* @author: Rob Aldred, raldred@gmail.com
*/
(window._gsQueue || (window._gsQueue = [])).push( function() {
@raldred
raldred / IntervalTimer.js
Created November 4, 2013 12:26
Simple interval timer for IGE based on the engine's tickDelta
var IntervalTimer;
IntervalTimer = IgeEntity.extend({
classId: 'IntervalTimer',
init: function() {
IgeEntity.prototype.init.call(this);
this._acc = 0;
this._duration = 0;
this._callback = function() {
return this.log('no callback provided');
@raldred
raldred / SoundManager.coffee
Last active December 25, 2015 13:19
SoundManager for IGE using createjs's soundJS and TweenMax for music fading Grab the instance of the soundmanager class with the following `@sound_manager = SoundManager.getInstance()`
SoundManager = IgeClass.extend
classId: 'SoundManager'
init: ->
@log 'Initializing'
@volumes = {
music: .6
fx: .6
}
@music_instance = null
@effects_instances = {}
TypeError: Not a string or buffer
at Hash.update (crypto.js:209:17)
at ErrorHandler.module.exports.Observable.extend.sendErrorReport (/WWW/jsbin/lib/handlers/error.js:103:40)
at ErrorHandler.module.exports.Observable.extend.uncaughtError (/WWW/jsbin/lib/handlers/error.js:51:10)
at next (/WWW/jsbin/node_modules/express/node_modules/connect/lib/proto.js:194:17)
at ErrorHandler.module.exports.Observable.extend.httpError (/WWW/jsbin/lib/handlers/error.js:35:5)
at next (/WWW/jsbin/node_modules/express/node_modules/connect/lib/proto.js:194:17)
at next (/WWW/jsbin/node_modules/express/node_modules/connect/lib/proto.js:196:11)
at pass (/WWW/jsbin/node_modules/express/lib/router/index.js:107:24)
at nextRoute (/WWW/jsbin/node_modules/express/lib/router/index.js:100:7)
@raldred
raldred / gist:6189179
Last active December 20, 2015 20:18
Raspberry Pi refuses to work with Apple Aluminium keyboard
usb 1-1.3: new high-speed USB device number 26 using dwc_otg
usb 1-1.3: New USB device found, idVendor=05ac, idProduct=1006
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: Keyboard Hub
usb 1-1.3: Manufacturer: Apple Inc.
usb 1-1.3: SerialNumber: 000000000000
usb 1-1.3:1.0: USB hub found
usb 1-1.3:1.0: 3 ports detected
usb 1-1.3:1.0: hub_port_status failed (err = -71)
usb 1-1.3:1.0: hub_port_status failed (err = -71)
@raldred
raldred / gist:5780675
Created June 14, 2013 09:38
zavvi checkout broken on android chrome
["_trackEvent", "Checkout", "Payment Method", "new card"] main-1.0.86.js:20
["_trackEvent", "Checkout", "Payment Method", "delivery address used for billing address"] main-1.0.86.js:20
GET main-1.0.86.js:20
["_trackEvent", "Checkout", "Delivery Address", "PCA Find Address"] main-1.0.86.js:20
Post successful. main-1.0.86.js:20
Poll start. main-1.0.86.js:20
Resource interpreted as Script but transferred with MIME type text/html: "https://services.postcodeanywhere.co.uk/popups/inline.aspx?account_code=THE…tion=lookup&type=by_postcode&callback=pcaByPostcodeEndAH71&postcode=Sk25uw". main-1.0.86.js:6541
Done. main-1.0.86.js:20
["_trackEvent", "Checkout", "Standard Delivery", "1|Standard%20Delivery%20-%20%A30.00%A0%A0%A0"] main-1.0.86.js:20
200: Use the proper data. main-1.0.86.js:20
@raldred
raldred / gist:4155079
Created November 27, 2012 16:02
Unique array combination generation
Compare.prototype.getCombinations = function(arr) {
var r = 2;
var pool = arr;
var n = pool.length;
if(r > n) {
return;
}
var indices = [0,1];
var res = [];
var tmp = [];
@raldred
raldred / gist:2344596
Created April 9, 2012 16:33
Draw Something libdvm error & stack
04-09 17:19:33.021: E/dalvikvm(31980): JNI ERROR (app bug): attempt to use stale global reference 0x400212 (should be 0x500212)
04-09 17:19:33.021: E/dalvikvm(31980): VM aborting
04-09 17:19:33.021: A/libc(31980): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
04-09 17:19:33.536: I/DEBUG(31893): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-09 17:19:33.536: I/DEBUG(31893): Build fingerprint: 'google/yakju/maguro:4.0.2/ICL53F/235179:user/release-keys'
04-09 17:19:33.536: I/DEBUG(31893): pid: 31980, tid: 31980 >>> com.omgpop.dstfree <<<
04-09 17:19:33.536: I/DEBUG(31893): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
04-09 17:19:33.536: I/DEBUG(31893): r0 00000000 r1 000a0aa8 r2 00000000 r3 00000000
04-09 17:19:33.536: I/DEBUG(31893): r4 deadd00d r5 40890c58 r6 0000020c r7 40824881
04-09 17:19:33.536: I/DEBUG(31893): r8 4086d304 r9 00400212 10 bebef630 fp 0000054c
@raldred
raldred / gist:1358611
Created November 11, 2011 17:25
adduser man page
ADDUSER(8) ADDUSER(8)
NAME
adduser, addgroup - add a user or group to the system
SYNOPSIS
adduser [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--dis‐
abled-login] [--gecos GECOS] [--add_extra_groups] [--encrypt-home] user
adduser --system [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login]