Skip to content

Instantly share code, notes, and snippets.

View Overv's full-sized avatar

Alexander Overvoorde Overv

View GitHub Profile
import std.socket;
import std.stdio;
import std.conv;
static import file = std.file;
import gzip;
const string content = "{}";
void main() {
TcpSocket server = new TcpSocket();
@Overv
Overv / localstoragewtf.md
Created October 15, 2013 14:44
Yet another JavaScript WTF

The local storage functionality in browsers is a bit limited and this can lead to some rather surprising behaviour.

localStorage[0] = false;

if (localStorage[0]) {
    console.log('wtf'); // runs?!
}
@Overv
Overv / KV1RET.md
Last active December 25, 2015 14:29
Vreemde ritnummers RET

KV6 update

<?xml version="1.0" encoding="utf-8"?>
<tmi8:VV_TM_PUSH xmlns:tmi8="http://bison.connekt.nl/tmi8/kv6/msg">
  <tmi8:SubscriberID>GOVI</tmi8:SubscriberID>
  <tmi8:Version>BISON 8.1.1.0</tmi8:Version>
  <tmi8:DossierName>KV6posinfo</tmi8:DossierName>
 2013-10-15T15:05:30.0281371+02:00
@Overv
Overv / hello.asm
Created June 5, 2013 14:38
Hello World in x86 assembly with Intel syntax
extern exit, printf
section .data
msg db "Hello World!", 10, 0
section .text
global main
main:
push msg
call printf
@Overv
Overv / hello.s
Last active December 17, 2015 18:49
Hello World
.text
message: .asciz "Hello, world!\n"
.global main
main:
# Initialize stack base pointer
movl %esp, %ebp
<?php
if (!isset($_GET['profile']) || !isset($_GET['page']) || !is_numeric($_GET['page']) || $_GET['page'] < 1) {
die("Specify a profile id and page as GET parameter.");
}
$page = intval($_GET['page']);
// Get profile
$profile = file_get_contents('http://steamcommunity.com/id/' . $_GET['profile']);
preg_match("/Profile_([0-9]+)/", $profile, $id); $id = $id[1];
@Overv
Overv / main.cpp
Created October 31, 2012 21:11
Direct3D 10 Hello World
// Headers
#include <Windows.h>
#include <D3D10.h>
// Parameters
const int WIDTH = 800;
const int HEIGHT = 600;
// Shader
#define SHADER(x) #x
@Overv
Overv / main.cpp
Created October 31, 2012 20:42
Broken Direct3D 10 base code
// Headers
#include <Windows.h>
#include <D3D10.h>
#include <D3DX10.h>
#include <fstream>
#include <vector>
// Parameters
const int WIDTH = 800;
const int HEIGHT = 600;
@Overv
Overv / Assembler.cpp
Created April 21, 2012 20:31
A simple runtime assembler written in C++
#include "Assembler.hpp"
Assembler::Assembler()
{
}
int Assembler::Run()
{
if ( code.size() == 0 ) return -1;
// Headers
#include <windows.h>
#include "GLee.h"
// Globals
bool g_WindowOpen = true;
// Window event handler
LRESULT CALLBACK windowEvent( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
{