Skip to content

Instantly share code, notes, and snippets.

#version 330 core
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec3 aNormal;
layout (location = 2) in vec2 aTexCoords;
out vec2 TexCoords;
out vec3 Normal;
out vec3 FragPos;
### Keybase proof
I hereby claim:
* I am creaturephil on github.
* I am creaturephil (https://keybase.io/creaturephil) on keybase.
* I have a public key ASBZCeJaBQYoS38Z8CtLgJvR6F_UUTaiAoS5T6mz-sxNvwo
To claim this, I am signing this object:
let daggy = {}
daggy.tagged = (typeName, fields) => {
function constructor() {
const values = Array.prototype.slice.call(arguments);
const proto = {
toString() {
return typeName + '(' + values.toString() + ')'
}
}
@CreaturePhil
CreaturePhil / endian.c
Last active August 19, 2017 04:52
buffer overflow exploit
#include <stdio.h>
int main() {
int a = 0x12345678;
unsigned char *c = (unsigned char*)(&a);
if (*c == 0x78) {
printf("little-endian\n");
} else {
printf("big-endian\n");
}
return 0;
char *strstr4(char *payload, char *token) {
int found = 0;
char *current = token;
while (*payload != '\0') {
if (*payload == *current) {
current++;
if (*current == '\0') {
found = 1;
break;
const Observable = subscribe =>
({
subscribe,
map: f =>
Observable(observer =>
subscribe({next: x => observer.next(f(x))})
),
filter: f =>
Observable(observer =>
subscribe({next: x => f(x) ? observer.next(x) : null})
body {
margin: 0 auto;
max-width: 50em;
font-family: "Helvetica", "Arial", sans-serif;
line-height: 1.5;
padding: 4em 1em;
}
h2 {
margin-top: 1em;
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import './index.css';
const Comp = g =>
({
fold: g,
contramap: f =>
Comp(x => g(f(x))),
concat: other =>
@CreaturePhil
CreaturePhil / db.js
Last active January 17, 2017 22:19
temp cache db
const steno = require('steno')
const fs = require('graceful-fs')
let temp = {}
function write(key, value) {
temp[key] = value;
fs.readFile('test.json', 'utf-8', (err, data) => {
console.log(data)
if (!data) data = '{}';
'use strict';
let db = require('machdb')('mongo url here');
const faker = require('faker');
const userUtils = require('./dev-tools/users-utils.js');
const Connection = userUtils.Connection;
const User = userUtils.User;