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
| //Keymap | |
| var keys = { | |
| up: 38, | |
| down: 40, | |
| left: 37, | |
| right: 39, | |
| key_z: 90, | |
| key_x: 88, | |
| return: 13, | |
| escape: 27, |
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
| 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; | |
| } | |
| } |
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
| //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 |
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() { | |
| var Delay; | |
| Delay = function(callback, time, args) { | |
| var _timer; | |
| _timer = setTimeout(function() { | |
| if (!args) { | |
| callback(); | |
| } else { | |
| callback(args); |
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 sourceFiles = [ | |
| ]; | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| coffee: { | |
| compileJoined: { | |
| options: { join: true}, | |
| files: {"build/build.js" : sourceFiles} |
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
| 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 |
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
| class LogicGates: | |
| @staticmethod | |
| def AND(A,B): | |
| if A == 1 and B == 1: | |
| return 1 | |
| else: | |
| return 0 | |
| @staticmethod |
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
| /*C# Snippets | |
| --------------- | |
| Open process | |
| -------------------------------- | |
| */ | |
| using System.Diagnostics |
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
| https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py |
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
| 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); | |
| } |