Skip to content

Instantly share code, notes, and snippets.

@ryandoherty
ryandoherty / gist:f0165cf7d0659647aba7fe29d3f49c84
Created January 14, 2017 18:59
rcp telemetry payload example
{
s: {
t: sensorData.tick,
d: [
sensorData.MAP,
sensorData.RPM,
sensorData.AccelX,
sensorData.AccelY,
sensorData.AccelZ,
sensorData.Yaw,
http://jlvaillant.smugmug.com/Animals/Birds/Egrets-Herons/2400674_93hKQw#!i=125787395&k=hQSj9
https://secure.smugmug.com/signup.mg
http://akglowaski.smugmug.com/
http://mmulqueen.smugmug.com/
http://randy.smugmug.com/
http://kentwaller.smugmug.com/
http://www.smugmug.com/keyword/today/family
http://rdoherty.smugmug.com/
http://chestone.smugmug.com/
http://www.smugmug.com/pro/features/
@ryandoherty
ryandoherty / gist:5348343
Created April 9, 2013 18:52
Renders a webpage to a png. Waits 500ms after the last network request to ensure ajax content loads (not 100% guaranteed, but 500ms is usually enough).
var webpage = require('webpage'),
system = require('system'),
fs = require('fs'),
start,
urls = fs.read('urls.txt').split("\n"),
index = 0;
function fetch(url) {
var timer,
Operating system: Linux
0.0.0 Linux 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64
CPU: amd64
family 6 model 45 stepping 7
8 CPUs
Crash reason: SIGABRT
Crash address: 0xbd8000043d4
Thread 0 (crashed)
Operating system: Linux
0.0.0 Linux 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64
CPU: amd64
family 6 model 45 stepping 7
8 CPUs
Crash reason: SIGABRT
Crash address: 0xbd8000041b3
Thread 0 (crashed)
@ryandoherty
ryandoherty / precommit.sh
Created January 24, 2012 01:29
Precommit hook for running PHPUnit tests
#!/bin/sh
phpunit --bootstrap include/tests/bootstrap.php include/tests/
@ryandoherty
ryandoherty / slideshow.js
Created January 21, 2011 03:25
Slideshow in 12 lines of JavaScript
<script>
/*
A div with an id of 'slideshow' contains five images, the first of which is shown and the others are hidden using
a display style of none. Using JavaScript, create a simple slideshow that cycles through the images, displaying
each image for three seconds at a time, looping back to the first image when the end is reached. You cannot use
jQuery or any other library.
*/
(function() {
var images = document.getElementById("slideshow").getElementsByTagName("img");
var currentIndex = 0;
@ryandoherty
ryandoherty / userChrome.css
Created September 13, 2009 18:33
Favicons in Firefox (Mac) Bookmarks Toolbar
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.bookmark-item > .toolbarbutton-icon {
display: -moz-box ! important;
background-position: 0px 1px !important;
padding-right: 3px ! important;
}
.bookmark-item:hover > .toolbarbutton-icon {
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-mid.png") repeat-x;