This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ // Wrap everything up in a function | |
var count,person; // These become private to this wrapped scope, and do not clutter the global namespace. | |
count=0; // Modify private count var, | |
person= function(name){ | |
this.name = name; | |
count++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Taken from: http://www.movable-type.co.uk/scripts/sha256.html | |
Put into: http://closure-compiler.appspot.com/home | |
exports: | |
/** | |
* Generates SHA-256 hash of string | |
* | |
* @param {String} msg String to be hashed | |
* @param {Boolean} [utf8encode=true] Encode msg as UTF-8 before generating hash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Suppress mouse events if they hit panel with id "glassPane" | |
* unless a MouseDragged gesture is in process to ensure that every MouseClickedEvent that hits | |
* will be followed by an MouseReleasedEvent even if it's coords do not overlap any other nifty elements. | |
*/ | |
private final JoglInputSystem inputSystem = new JoglInputSystem() { | |
boolean niftyBusy=false; | |
@Override | |
public void mouseDragged(MouseEvent mouseEvent) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pin TFT Leo Uno | |
------------------- | |
D0 DB8 PD2 PD0 | |
D1 DB9 PD3 PD1 | |
D2 DB10 PD1 PD2 | |
D3 DB11 PD0 PD3 | |
D4 DB12 PD4 PD4 | |
D5 DB13 PC6 PD5 | |
D6 DB14 PD7 PD6 | |
D7 DB15 PE6 PD7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var spawn = require('child_process').spawn, | |
util = require('util'), | |
child; | |
var bin= './minerd.exe', | |
args = { | |
algo: 'scrypt', | |
threads: 8, | |
user: 'LXKwG9oYazZPUc6ozF5t3zyf6xBxbEbTXP', | |
pass: 'x', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window,PIXI){ | |
var regenerateCache = function(tilemap){ | |
var tileset = tilemap.tileset; | |
tilemap.cache = {}; // empty cache. | |
var x=tileset.margin,y=tileset.margin,row=0,col=0; | |
var id= 0; | |
while(tileset.margin+row*tileset.spacing+y+tileset.tileheight <=tileset.imageheight){ | |
x=tileset.margin,col=0; | |
while(tileset.margin+col*tileset.spacing+x+tileset.tilewidth <= tileset.imagewidth){ | |
var bounds = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float accumlatedTime=0; | |
Sprite cow; | |
float runSpeed = 1; # in pixels per second | |
float fallingAccelleration = 0.3; # how fast the fall should reach topspeed plummeting. | |
float maxFallVelocity = 3.0; # Should not be able to fall faster than 3px/s | |
onFrame(float deltaTime): | |
accumulatedTime + = deltaTime; | |
# Timestamp when a jump reached it's peak height and you're scheduled with a romantic date with gravity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH | |
remote: ../tumblargh | |
specs: | |
tumblargh (0.2.2) | |
activesupport (>= 3.1) | |
api_cache | |
nokogiri | |
treetop | |
GEM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.3/angular.min.js"></script> | |
<script type="text/javascript"> | |
var app = angular.module('app',['ng']); | |
app.controller('MainCtrl', function($scope){ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var guid = function(){ | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); | |
}; |