Skip to content

Instantly share code, notes, and snippets.

View koddsson's full-sized avatar
:fishsticks:

Kristján Oddsson koddsson

:fishsticks:
View GitHub Profile
@koddsson
koddsson / bootstrap.sh
Last active August 29, 2015 14:05
Server setup
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y git
git clone https://gist.github.com/1b1bd6a093794f9cfc6c.git server-setup
cd server-setup
sh setup.sh
cd ..
rm -rf server-setup
#!/bin/bash
# Delay before starting
DELAY=3
# Sound notification to let one know when recording is about to start (and ends)
beep() {
paplay /usr/share/sounds/KDE-Im-Irc-Event.ogg &
}
@koddsson
koddsson / 28.clj
Created July 6, 2014 23:23
Running into problems with Clojure return types
(ns com.koddsson.for-clojure
(:use [clojure.test :only [is deftest run-tests]]))
(defn my-flatten
([x] (if (not (and (seq? x) (vector? x)))
x ; If x is not a sequence nor a vector
(map my-flatten x)))) ; else recursivly apply the flatten function
(deftest test28
(is (= (my-flatten '((1 2) 3 [4 [5 6]])) '(1 2 3 4 5 6)))

Keybase proof

I hereby claim:

  • I am koddsson on github.
  • I am koddsson (https://keybase.io/koddsson) on keybase.
  • I have a public key whose fingerprint is 891D 6C9B CAAD 8306 729D 9A5E C43C C5CA C64E 44AE

To claim this, I am signing this object: