Skip to content

Instantly share code, notes, and snippets.

View koddsson's full-sized avatar
:fishsticks:

Kristján Oddsson koddsson

:fishsticks:
View GitHub Profile

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:

@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)))
#!/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 / 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
content github-emojis ./ contentaccessible=true
var gulp = require('gulp');
gulp.task('default', function () {
var postcss = require('gulp-postcss');
return gulp.src('index.css')
.pipe(postcss([
require('postcss-style-guide')(),
require('cssnext')()
]))
.pipe(gulp.dest('build/'));
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
@koddsson
koddsson / filter-widget-selectboxes.js
Last active December 17, 2015 13:54
Filter widget select boxes based on a criteria.
// Edit this object with the id of the select element and a array of values to
// keep.
var optionsToKeep = {
'activity-pcat256': [0, 1],
'activity-pcat258': [0, 2, 3],
'activity-pcat257': [0, 4, 5]
};
var filterSelectBoxes = function(options) {
var toDelete = [];

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 2696 7637 2476 4B0B F2B7 19D4 595B 7AC1 BC27 37C6

To claim this, I am signing this object:

2016-03-20 20:23:37.265154: open_declaration: in
2016-03-20 20:23:37.266185: 37 50
2016-03-20 20:23:37.267052: 1286
2016-03-20 20:23:37.267156: path: in
2016-03-20 20:23:37.267740: send_request: in
2016-03-20 20:23:37.268202: send: in
2016-03-20 20:23:37.268541: send: {"callId": 2, "req": {"typehint": "SymbolAtPointReq", "file": "/Users/koddsson/Repos/quizup-monorepo/src/scala/com/quizup/moderation/endpoints/players.scala", "point": 1287}}
2016-03-20 20:23:38.274219: unqueue: result received {
"callId": 2,
"payload": {