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
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
set nocompatible | |
colorscheme desert | |
tab all | |
set mouse=a |
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
.code64 | |
.section .text | |
.global thread_context_switch | |
# from thread: rdi = interrupt_stack_frame*, rsi = registers_t* | |
# to thread: rdx = const interrupt_stack_frame*, rcx = const registers_t* | |
thread_context_switch: | |
# store general purpose registers to *rdi | |
mov %r15, 0(%rdi) | |
mov %r14, 8(%rdi) | |
mov %r13, 16(%rdi) |
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
noremap <silent> <leader>qw :botright cwindow<cr> | |
noremap <silent> <leader>qo :botright copen<cr> | |
noremap <silent> <leader>qc :cclose<cr> | |
noremap <silent> <leader>qq :cc!<cr> | |
noremap <silent> <leader>qn :cnext<cr> | |
noremap <silent> <leader>qp :cprev<cr> | |
noremap <silent> <leader>lw :botright lwindow<cr> | |
noremap <silent> <leader>lo :botright lopen<cr> | |
noremap <silent> <leader>lc :lclose<cr> |
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 <stdbool.h> | |
#include <stdio.h> | |
#include <X11/Xlib.h> | |
#include <GL/glx.h> | |
#include <GL/glxext.h> | |
#include <GL/gl.h> | |
GLXContext glXCreateContextAttribsARB( | |
Display *dpy, GLXFBConfig config, |
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
#define NS_IN_SEC 1000000000 | |
// I bet there's a subtle overflow bug somewhere here | |
static inline struct timespec timespec_add(const struct timespec * restrict a, const struct timespec * restrict b) | |
{ | |
unsigned long nsecs = (a->tv_nsec % NS_IN_SEC) + (b->tv_nsec % NS_IN_SEC); | |
struct timespec result = { | |
a->tv_sec + b->tv_sec + (a->tv_nsec / NS_IN_SEC) + (b->tv_nsec / NS_IN_SEC) + (nsecs / NS_IN_SEC), | |
nsecs % NS_IN_SEC | |
}; |
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 Data.Char | |
strToInt :: String -> Int | |
strToInt ('+':xs) = strToInt xs | |
strToInt ('-':xs) = - strToInt xs | |
strToInt xs = | |
foldl step 0 xs | |
where | |
step acc x = acc * 10 + (digitToInt x) | |
strToInt _ = undefined |
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
module YaJSON where | |
import Text.Parsec | |
import qualified Text.Parsec.Token as Token | |
import qualified Text.Parsec.Language as Language | |
import qualified Data.Map as Map | |
language = Language.javaStyle | |
lexer = Token.makeTokenParser language |
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
/* | |
LUFA Library | |
Copyright (C) Dean Camera, 2012. | |
dean [at] fourwalledcubicle [dot] com | |
www.lufa-lib.org | |
*/ | |
/* |
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
/* | |
LUFA Library | |
Copyright (C) Dean Camera, 2012. | |
dean [at] fourwalledcubicle [dot] com | |
www.lufa-lib.org | |
*/ | |
/* |
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 150 | |
layout(std140) uniform Camera | |
{ | |
mat4 view_matrix; | |
mat4 projection_matrix; | |
} camera; | |
layout(std140) uniform Light | |
{ |
OlderNewer