Skip to content

Instantly share code, notes, and snippets.

View Overv's full-sized avatar

Alexander Overvoorde Overv

View GitHub Profile

Keybase proof

I hereby claim:

  • I am overv on github.
  • I am overv (https://keybase.io/overv) on keybase.
  • I have a public key whose fingerprint is 6FC5 3ADC 96B2 9E45 BACE DD87 1914 5C77 E4F4 3EB3

To claim this, I am signing this object:

@Overv
Overv / main.cpp
Last active August 29, 2015 14:18
Triangle in OpenGL without vertex data
#include <SDL.h>
#define GLEW_STATIC
#include <GL/glew.h>
const char* vertShaderSrc =
"#version 440\n"
"void main() {"
"if (gl_VertexID == 0) gl_Position = vec4( 0.0, 0.5, 0, 1);"
"if (gl_VertexID == 1) gl_Position = vec4( 0.5, -0.5, 0, 1);"
@Overv
Overv / main.cpp
Created April 15, 2015 19:15
Hello World
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
// 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 )
{
@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 / clean.py
Last active October 28, 2015 13:11
import os
import re
def get_filepaths(directory):
file_paths = []
for root, directories, files in os.walk(directory):
for filename in files:
filepath = os.path.join(root, filename)
file_paths.append(filepath)
<?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 / 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
@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 / 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?!
}