Skip to content

Instantly share code, notes, and snippets.

View mojobojo's full-sized avatar

Mojobojo mojobojo

View GitHub Profile
@mojobojo
mojobojo / pi.md
Last active March 14, 2018 17:31
Getting every 4 digit ATM pin number from pi

The Code

#include <Windows.h>
#include <stdio.h>
#include <stdint.h>

struct PIStruct {
	size_t position;
	int32_t found;
};
// Clearly the best hello world out there.
#define _ATL_ATTRIBUTES 1
#define _WINDLL 1
#include <atlbase.h>
#include <atlcom.h>
#include <string.h>
#include <comdef.h>
#include <string>
#include <fstream>
#include <iostream>
tilemap "Images\hyptosis_tile-art-batch-1.png"
width 16
height 16
lights 1
light 0 {
color 1.000000,1.000000,1.000000,1.000000
position 10,10
}
ambientlight 0.16,0.16,0.16
layers 2
; Compile with nasm
; nasm Small.asm -o Small.exe
bits 64
%define ImageAddress 0x0000000140000000
%define BaseAddress 0x00010000
%define addr(x) (x+ImageAddress+BaseAddress)
%define Kernel32Handle rsp+0x50
%define Kernel32PeHeader rsp+0x58
%define GetProcAddress rsp+0x60
@mojobojo
mojobojo / vimrc
Last active February 7, 2018 17:52
" Joeys vim config
"
" Some options from
" - https://github.com/rygorous/vimfiles/blob/master/vimrc
set nocompatible
if has("win32")
" Maximize on startup