Skip to content

Instantly share code, notes, and snippets.

View Tritlo's full-sized avatar

Matthías Páll Gissurarson Tritlo

View GitHub Profile
@Tritlo
Tritlo / cVimrc
Last active August 29, 2015 14:03
cVimrc
map D scrollFullPageDown
map E scrollFullPageUp
map <leader>bh previousTab
map <leader>bl nextTab
map <leader>bn :tabnew<CR>
map <leader>bd :execute x<CR>
let mapleader="<Space>"
map <C-e> E
map <C-d> D
map <C-u> e
### Keybase proof
I hereby claim:
* I am tritlo on github.
* I am mpgis (https://keybase.io/mpgis) on keybase.
* I have a public key whose fingerprint is 050D 101B 1677 E442 C1E1 7659 F365 878C C03C DDFD
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am tritlo on github.
* I am tritlo (https://keybase.io/tritlo) on keybase.
* I have a public key whose fingerprint is C77E 292D BCDB 00FE 822B C363 24D6 5B6A 067D A561
To claim this, I am signing this object:
; Lengd stafrófs = 32 stafir
; lengd stafrófs - 3 = 29 stafir
; Getum raðað JÓL á 3! = 6 vegu
; Getum raðað rest á 29! vegu
; Getum svo sett umröðunina á JÓL á 30 staði.
; fáum því að fjöldi umraðana á stafrófinu með JÓL við hliðná hvoru öðru er
; 29!*3!*30
; En ef JÓL þurfa að vera í réttri röð, þá er þetta bara 30! (getum þá litið á JÓL sem bara einn staf)
(def stafrof "AÁBDÐEÉFGHIÍJKLMNOÓPRSTUÚVXYÝÞÆÖ")
@Tritlo
Tritlo / DCPU16A.py
Created April 22, 2012 05:35
Rudimentary assembler for the DCPU-16
#Matthias Pall Gissurarson/Tritlo's Assembly Compiler for the DCPU-16 22. april 2012
#Use at your own risk.
import sys
import argparse
#Tekur inn hex int, skilar lista af lengd n
def hexToBin(hexint, n):
v = int(hexint,16)
l = [0]*n
@Tritlo
Tritlo / countdown.c
Created May 14, 2012 23:18
Diablo III countdown
#include <stdio.h>
#include <time.h>
#ifdef __unix__
int clear()
{
system("clear");
return 0;
}
#elif defined _WIN32
@Tritlo
Tritlo / 2x.py
Last active October 7, 2015 14:58
A program that finds numbers which when multiplied by two give the number with the last digit put to the front
# Matthias Pall Gissurarson 26. jul 2012
#Copyright (C) 2012 Matthías Páll Gissurarson
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM

Keybase proof

I hereby claim:

  • I am tritlo on github.
  • I am tritlo (https://keybase.io/tritlo) on keybase.
  • I have a public key whose fingerprint is 926A AC14 F0AE 758A 063B 3E47 6EB0 F18F FDC7 2B21

To claim this, I am signing this object:

@Tritlo
Tritlo / xmonad.hs
Created February 20, 2013 00:48
My current xmonad.hs
import XMonad
--Fyrir gnomepanel
import XMonad.Config.Gnome
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import System.IO
import XMonad.Hooks.DynamicLog
@Tritlo
Tritlo / PrufuGen.java
Last active December 14, 2015 01:09
A small program that generates variables for Xilinx testbenches, written when I was in digital design.
#Copyright (C) 2012 Matthías Páll Gissurarson
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWA