View utils.js
//Keymap
var keys = {
up: 38,
down: 40,
left: 37,
right: 39,
key_z: 90,
key_x: 88,
return: 13,
escape: 27,
View str_rot.c
char *rotateString(char *str, int count) {
size_t len = strlen(str);
int counter;
for(counter=0;counter < len;counter++) {
int value = str[counter];
if((char)value != ' ') {
value = value + count;
str[counter] = value;
}
}
View slotvm_v23.js
//Very simple jump on 9 to next op
/*
var program = ["0","0","0","1337","9","4"];
var pc = 0;
for(var i=0;i < program.length;i++) {
switch(program[i])
{
case "0":
//Skip
View Delay-compiled.js
(function() {
var Delay;
Delay = function(callback, time, args) {
var _timer;
_timer = setTimeout(function() {
if (!args) {
callback();
} else {
callback(args);
View Gruntfile.js
var sourceFiles = [
];
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
compileJoined: {
options: { join: true},
files: {"build/build.js" : sourceFiles}
View phaser_notes.txt
Phaser.js Notes
By: Mouseroot
Phaser init
-----------
var game = new Phaser.Game(width, height, Render_mode, canvas_id, gamestate_object, transparent_canvas, anti-alias, physics);
render_modes
Phaser.CANVAS - Force canvas
Phaser.WEBGL - Force webgl
View Gates.py
class LogicGates:
@staticmethod
def AND(A,B):
if A == 1 and B == 1:
return 1
else:
return 0
@staticmethod
View snips.cs
/*C# Snippets
---------------
Open process
--------------------------------
*/
using System.Diagnostics
View gist:5cba89768ee68e067150
https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py
View parsePost.cs
Dictionary<string, string> postParams = new Dictionary<string, string>();
postParams.Clear();
string[] rawParams = rawData.Split('&');
foreach (string param in rawParams)
{
string[] kvPair = param.Split('=');
string key = kvPair[0];
string value = HttpUtility.UrlDecode(kvPair[1]);
postParams.Add(key, value);
}