Skip to content

Instantly share code, notes, and snippets.

@mouseroot
mouseroot / parsePost.cs
Created April 24, 2014 00:01
C# POSTDATA Parser
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);
}
https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py
@mouseroot
mouseroot / Gates.py
Created November 7, 2014 19:35
Gates Class With Examples (HalfAdder/FullAdder)
class LogicGates:
@staticmethod
def AND(A,B):
if A == 1 and B == 1:
return 1
else:
return 0
@staticmethod
@mouseroot
mouseroot / phaser_notes.txt
Last active August 29, 2015 14:15
Phaser.js Notes
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
@mouseroot
mouseroot / Gruntfile.js
Last active August 29, 2015 14:17
Coffeescript grunt file + index test page
var sourceFiles = [
];
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
compileJoined: {
options: { join: true},
files: {"build/build.js" : sourceFiles}
@mouseroot
mouseroot / Delay-compiled.js
Last active August 29, 2015 14:19
Delay.js - Simple wrapper around setTimout to cleanup the handle refs
(function() {
var Delay;
Delay = function(callback, time, args) {
var _timer;
_timer = setTimeout(function() {
if (!args) {
callback();
} else {
callback(args);
@mouseroot
mouseroot / LICENSE.txt
Created February 11, 2012 22:55 — 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
@mouseroot
mouseroot / sniff_popups.py
Created August 23, 2012 01:39
sniff popups
import socket
import os
def copyfile():
host_path = "C:\Windows\System32\drivers\etc\hosts"
host_repl = "myhosts"
os.system("copy %s %s" % (host_repl,host_path))
@mouseroot
mouseroot / requests.java
Created August 23, 2012 02:11
Post requests in java
import java.io.*;
import java.net.*;
import javax.swing.*;
public class Requests {
static String domain;
static URL myurl;
static URLConnection myurlc;
@mouseroot
mouseroot / game.py
Created August 23, 2012 02:30
pygame class
import pygame
from pygame.locals import *
class Game:
def __init__(self):
pygame.init()
self.screen = pygame.display.set_mode((640,480))
self.running = 1
self.clock = pygame.time.Clock()