Skip to content

Instantly share code, notes, and snippets.

@CreaturePhil
CreaturePhil / _vimrc
Created March 5, 2022 19:22
vimrc on windows
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
call plug#begin()
Plug 'junegunn/fzf'
Plug 'morhetz/gruvbox'
Plug 'tpope/vim-dispatch'
Plug 'jiangmiao/auto-pairs'
Plug 'ervandew/supertab'
call plug#end()
#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;
@CreaturePhil
CreaturePhil / .vimrc
Last active May 9, 2024 22:48
vimrc version 10000
""
"" General
""
set nocompatible " No compatibility with vi, use vi iMproved
filetype plugin indent on " Load plugins according to filetype
syntax on " Enable syntax highlighting
set autoindent " Indent according to previous line
set expandtab " Use spaces instead of tabs
### 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 =>