This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"" | |
"" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let daggy = {} | |
daggy.tagged = (typeName, fields) => { | |
function constructor() { | |
const values = Array.prototype.slice.call(arguments); | |
const proto = { | |
toString() { | |
return typeName + '(' + values.toString() + ')' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0 auto; | |
max-width: 50em; | |
font-family: "Helvetica", "Arial", sans-serif; | |
line-height: 1.5; | |
padding: 4em 1em; | |
} | |
h2 { | |
margin-top: 1em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 => |
NewerOlder