Skip to content

Instantly share code, notes, and snippets.

Avatar

Karl-Oskar Rikås funrep

View GitHub Profile
@funrep
funrep / lispmonad.hs
Last active Aug 29, 2015
crazy and most likely stupid idea i got on the bus
View lispmonad.hs
Note to self: possible to write a Lisp-like DSL within Haskell using Writer monad?
main = runLisp $ do
def "f" $ do
args $ do
"x"
"y"
body $ do
"x" + "y"
lispPrint $ "f" $ do
View errors
*Main> main
> NICK tob
> USER tob 0 * :tob
:irc.codetalk.io NOTICE AUTH :*** Looking up your hostname...
failed to parse
:irc.codetalk.io NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead
failed to parse
PING :D433C6EE
failed to parse
^CInterrupted.
View gist:10902904
<Player>:
canvas:
Rectangle:
pos: root.center
size: 40, 40
<Screen>:
Player
@funrep
funrep / gist:0c3459669c6280f002cd
Created May 2, 2014
Linux temperature check laptop
View gist:0c3459669c6280f002cd
sudo apt-get install xsensor
@funrep
funrep / fonts.conf
Last active Aug 29, 2015
Nice font config from trisquil
View fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<!--
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.
@funrep
funrep / gittips.md
Created May 14, 2014
Foxborons awesome git tips
View gittips.md

GIT STUFF!!!!

if you fuck up shit

git clone blalbblalb
cd blablabla
git checkout -b bar origin/bar
git checkout master
git checkout -b foo
git cherry-pick foo~1
@funrep
funrep / lenstute.md
Last active Aug 29, 2015
Mini van Laarhoven lens tutorial
View lenstute.md

Basic functional references with pairs.

data FRef a b = FRef
  { get :: a -> b
  , set :: b -> a -> a
  }

fstF :: FRef (x, y) x
fstF = FRef
@funrep
funrep / .emacs.el
Created Jun 19, 2014
My emacs config, nothing fancy...
View .emacs.el
;; Visual stuff
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)
(setq inhibit-startup-message t)
(global-linum-mode t)
(setq linum-format " %d ")
(set-window-fringes nil 0 0)
(set-fringe-mode 0)