Skip to content

Instantly share code, notes, and snippets.

View StoneCypher's full-sized avatar

John Haugeland StoneCypher

View GitHub Profile
<script type="text/javascript">
var oldOL = window.onload;
window.onload = function() {
document.getElementById('ipod-menu-button-1803').click();
oldOL();
};
</script>
@StoneCypher
StoneCypher / PonterPointerClone.js
Last active August 29, 2015 14:05
PointerPointer Clone for Reddit (untried / untested, probably buggy)
// usage: var PPC = new PointerPointerClone();
// you need to actually put images in; i haven't
// fill in at least one for each quadrant, starting at line 24
// use the centers of each quadrant: (0.25,0.25), (0.25,0.75), (0.75,0.25), (0.75),(0.75)
// then you'll be able to see it working
function PointerPointerClone(Target, MoveThreshhold, MinTimeThreshhold) {
@StoneCypher
StoneCypher / gist:8c348f349940167fb0cb
Last active August 29, 2015 14:05
Useless empty page
<!doctype html>
<html>
<head>
<script type="text/javascript">
window.alert('hello, world!');
</script>
@StoneCypher
StoneCypher / gist:e726661e1fac2fecc9e1
Created September 29, 2014 06:43
Paypal Base Post-Fee
PBPF = fun(Amt) ->
Amt - ( (Amt * 0.029) + 0.3 ) end.
% Usage:
%
% 1> PBPF(2).
% 1.642
%
% This means that unless you qualify for bulk rates, a $2 payment will yield $1.64 .
function makeBoard(host, x, y) {
var i,j;
for (j=0; j<y; ++j) {
var div = document.createElement('div');
for (i=0; i<x; ++i) {
var inp = document.createElement('input');
inp.id = 'input_' + x.toString() + '_' + y.toString();
function makeBoard(host, subx, suby) {
var i,j,
sz = subx * suby;
for (j=0; j<sz; ++j) {
var div = document.createElement('div');
for (i=0; i<sz; ++i) {
/** @jsx React.DOM */
'use strict';
var React = require('react/addons'),
Flocks = require('flocks'),
Planet = require('gamecontrols/planet'), // just pretend
Vortex = require('gamecontrols/vortex'), // just pretend
Nebula = require('gamecontrols/nebula'), // just pretend
Ship = require('gamecontrols/planet'); // just pretend
/** @jsx React.DOM */
'use strict';
var React = require('react/addons'),
Planet = require('gamecontrols/planet'), // just pretend
Vortex = require('gamecontrols/vortex'), // just pretend
Nebula = require('gamecontrols/nebula'), // just pretend
Ship = require('gamecontrols/planet'); // just pretend
@StoneCypher
StoneCypher / gist:ab042a8f638c878dbb1d
Last active August 29, 2015 14:09
You are idiots
  1. Stop being idiots ====================

The central core of being an idiot is refusing to admit when you're wrong. One great way to be an idiot is to have people explain to you where you're wrong on something simple and straightforward, and instead of learning from it, you argue as if it's to be a point of opinion.

Math quizzes on Facebook, for example.

  1. The problem ==============
handler1.js:
------------
function HandleOne(req, res) { ... }
module.exports = HandleOne;
// and there's several more files like this