Skip to content

Instantly share code, notes, and snippets.

View madnight's full-sized avatar
💭
One does not so much learn category theory as absorb it over time.

Fabian Beuke madnight

💭
One does not so much learn category theory as absorb it over time.
View GitHub Profile
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
import qualified VM as V
import qualified Text.Parsec as P
import Control.Applicative ((<|>), (<$>))
import qualified Control.Monad.State as S
import qualified Data.Map as M
import Data.Maybe (fromJust)
data Intermediate = Comment String
| Inst V.Instruction
| Paramdef String
@epegzz
epegzz / Monaco_Linux-Powerline.ttf
Created January 18, 2012 17:19
Monaco for vim-powerline
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@pascalpoitras
pascalpoitras / config.md
Last active July 18, 2024 22:34
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@Gonzih
Gonzih / hn-aeson.hs
Last active September 30, 2016 15:23
Aeson HN example of nested JSON (unoptimized binary ~20 mb)
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson
import Control.Applicative ((<$>), (<*>))
import Control.Monad (mzero)
import Network.HTTP.Conduit
import Data.ByteString.Lazy.Internal (ByteString(..))
data Item = Item { title :: String
, url :: String
@BeauBouchard
BeauBouchard / Grandtheftauto5-linux.md
Last active March 8, 2022 08:54
How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

How to install Grand Theft Auto V on Linux (Ubuntu x64 14.04) using wine.

Date Completed: Not done yet ~~ April 23rd 2015

My Test System

  • Video Card: Nvidia GTX 465 (lol right? Game runs shitty)
  • Driver: tested on 331.38, works on 331.38+
  • OS: Ubuntu x64 14.04
  • POL: I used Play on linux 4, I assume most of the capabilities are in winetricks
  • Wine: wine-staging Sun, 19 Apr 2015 version 1.7.41 x64 bit