Skip to content

Instantly share code, notes, and snippets.

View robert-nix's full-sized avatar

Robert Nix robert-nix

View GitHub Profile
@robert-nix
robert-nix / Makefile
Created September 4, 2014 14:04
emscripten makefile
CC=emcc
WOPTS=-Wno-warn-absolute-paths
CFLAGS=-std=c++11 -fno-exceptions -O3 $(WOPTS)
LDFLAGS=
SOURCES=$(wildcard *.cpp */*.cpp)
BCS=$(SOURCES:.cpp=.bc)
EXEC=$(notdir $(shell pwd)).html
all: $(EXEC)
[[{"Game":{"CardID":"","ID":1,"__status":null,"Tags":{"ZONE":"PLAY","ENTITY_ID":1,"CARDTYPE":"GAME"}},"Players":[{"ID":1,"GameAccountId":{},"Player":{"CardID":"","ID":2,"__status":null,"Tags":{"HERO_ENTITY":4,"MAXHANDSIZE":10,"STARTHANDSIZE":4,"PLAYER_ID":1,"TEAM_ID":1,"ZONE":"PLAY","CONTROLLER":1,"ENTITY_ID":2,"MAXRESOURCES":10,"CARDTYPE":"PLAYER"}},"CardBackID":0},{"ID":2,"GameAccountId":{},"Player":{"CardID":"","ID":3,"__status":null,"Tags":{"HERO_ENTITY":36,"MAXHANDSIZE":10,"STARTHANDSIZE":4,"PLAYER_ID":2,"TEAM_ID":2,"ZONE":"PLAY","CONTROLLER":2,"ENTITY_ID":3,"MAXRESOURCES":10,"CARDTYPE":"PLAYER"}},"CardBackID":3}],"Type":"CREATE_GAME"},{"Entity":{"CardID":"HERO_07","ID":4,"__status":"Gul'dan (Gul'dan#0)","Tags":{"HEALTH":30,"ZONE":"PLAY","CONTROLLER":1,"ENTITY_ID":4,"FACTION":"NEUTRAL","CARDTYPE":"HERO","RARITY":"FREE"}},"Type":"FULL_ENTITY"},{"Entity":{"CardID":"CS2_056","ID":5,"__status":"Life Tap (Gul'dan#0)","Tags":{"COST":2,"ZONE":"PLAY","CONTROLLER":1,"ENTITY_ID":5,"FACTION":"NEUTRAL","CARDTYPE":"H
<?xml version="1.0" encoding="UTF-8"?>
<state
name="State_Burst_Item"
icon=""
passiveeffect=""
effecttype=""
ishidden="true"
lifetime="10000"
// A quick and dirty DLL injector
// This method relies on static linkage and the fact that kernel32 doesn't move
// Compile with the same bitness as the target and the dll.
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#include <stdio.h>
int GetPid(char *modName)
{
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
class Program
{
static void Main(string[] args)
{
new Tester().Run();

Subject: Apologies for the downtime, but we're coming back stronger.

Dear Simon,

As you may already know, BrowserStack experienced an attack on 9th November, 2014 at 23:30 GMT during which an individual was able to gain unauthorized access to some of our users’ registered email addresses. He then tried to send an email to all our registered users, but he was only able to reach less than 1% (our estimate is 5,000 users). The email contained inaccurate information, even claiming that BrowserStack would be

unit0.OneName = 94b000
unit0.X::OneName = 94b004
test = 7cfaf8
unit1.OneName = 94b00c
extern unit0.OneName = 94b000
; Listing generated by Microsoft (R) Optimizing Compiler Version 18.00.30501.0
TITLE D:\dev\PdbStaticTest\PdbStaticTest\unit1.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
@robert-nix
robert-nix / lzo_d.h
Created March 2, 2015 15:56
lzo decompressor (lzo1x) with the crap stripped out ("crap" includes sanity checks, so this will crash on invalid bitstream)
#ifndef assert
#define assert(x) ((void)0);
#endif
#define LZO_E_OK 0
#define LZO_E_ERROR (-1)
#define LZO_E_INPUT_OVERRUN (-4)
#define LZO_E_OUTPUT_OVERRUN (-5)
#define LZO_E_LOOKBEHIND_OVERRUN (-6)
#define LZO_E_EOF_NOT_FOUND (-7)
// includes:
#include <tmmintrin.h>
#include <stdint.h>
// remember to enable AVX instructions for the 3-op VEX mode if you want it
#define USE_SSSE3_MASK_GEN 1
// initializations: