Skip to content

Instantly share code, notes, and snippets.

@bsparks
bsparks / controller.js
Last active August 29, 2015 13:56
windows 8 xbox controller plugin for impact.js
ig.module('plugins.controller')
.requires('impact.system', 'impact.input')
.defines(function () {
// TODO: support 4 controllers
var controller = new GameController.Controller(0);
// extra keys for gamepad buttons (starting at -20 to support plusplus)
ig.KEY.GAMEPAD_A = -20;
ig.KEY.GAMEPAD_B = -21;
ig.KEY.GAMEPAD_X = -22;
var cube = EntityBuilder.build('Cubey-Doobey-Doo', {
position: [0, 3, 0],
components: {
model: {
//default
},
script: {
scripts: [
'assets/scripts/test.js'
]
@bsparks
bsparks / get_java.sh
Last active August 29, 2015 14:14
download java on ubuntu server
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.tar.gz
<!DOCTYPE html>
<html>
<head>
<title>Graph Paper</title>
<script type="text/javascript">
/* Declare global variables */
var spacing = 18;
var canvas;
var ctx;
var line;
@bsparks
bsparks / LICENSE.txt
Created December 5, 2011 23:45 — forked from jed/LICENSE.txt
write contextual templates
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bsparks
bsparks / LICENSE.txt
Created December 5, 2011 23:45 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bsparks
bsparks / LICENSE.txt
Created December 5, 2011 23:58 — forked from jed/LICENSE.txt
publish/subscribe, or pubsub
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_size": 11,
"translate_tabs_to_spaces": true,
"draw_white_space": "all",
"trim_trailing_white_space_on_save": true,
"ignored_packages":
[
"Vintage"
]
@bsparks
bsparks / jquery_click.sublime-snippet
Created June 11, 2012 19:02
jquery_click.sublime-snippet
<snippet>
<content><![CDATA[
\$(${1:selector}).click(function(e) {
e.preventDefault();
e.stopPropagation();
${2://handler}
});
]]></content>
<tabTrigger>click</tabTrigger>
@bsparks
bsparks / nts.js
Created July 10, 2012 22:43
start of my node.js multi svn tool
#!/usr/bin/env node
var _ = require("lodash"),
util = require('util'),
spawn = require('child_process').spawn,
fs = require("fs"),
p = require("path"),
ansi = require("ansi"),
cursor = ansi(process.stdout),
program = require("commander"),