Skip to content

Instantly share code, notes, and snippets.

@danfal
danfal / test.hs
Created March 14, 2013 17:41
Simple example of strange while-loop generation in Feldspar
import qualified Prelude as P
import Feldspar
import Feldspar.Compiler
-- Function that takes a y and returns a tuple (x,y) where x = y/2
test :: Data Int32 -> (Data Int32, Data Int32)
test y = whileLoop (0,y) (\(a,b) -> (cond a (b-a)) --(a*a)==((b-a)*(b-a)))
(\(a,b) -> ((a+1),b))
-- Dumb way of checking that two integers are not equal
@danfal
danfal / .vimrc
Last active March 9, 2017 13:34
.vimrc
filetype plugin indent on
syntax on
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set ruler
"set backupdir=~/.vim/backup//
@danfal
danfal / .tmux.conf
Last active June 14, 2016 06:51
.tmux.conf
bind a send-prefix
set -sg escape-time 1
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind r source-file ~/.tmux.conf \; display "Reloaded!"
/*
==============================================================================
This file was auto-generated by the Introjucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
@danfal
danfal / day0_bochs.txt
Last active December 1, 2018 11:41
overthewire-day0 köra i bochs emulator
# installera bochs och bochs-x gui plugin
# Skapa en 1.44MB floppy drive med interaktiva programmet 'bximage'
# dd conv=notrunc if=day0.bin of=a.img
# Skapa en bochsrc.txt som innehåller:
megs: 160
floppya: image="a.img", status=inserted # a.img = 1.44MB floppy generated with bximage, day0.bin dd'd into first 513 bytes (dd conv=notrunc if=day0.bin of=a.img)
boot: floppy
cpu: count=1