Skip to content

Instantly share code, notes, and snippets.

@Velrok
Velrok / random_name_generator.clj
Created September 28, 2013 11:45
Random name generator using combining adjectives with animals.
(def adjectives [
"adorable"
"adventurous"
"aggressive"
"alert"
"attractive"
"average"
"beautiful"
"blue-eyed "
"bloody"
@Velrok
Velrok / graphs.R
Created September 20, 2013 13:43
My R graphs.
source("helpers.R")
filter.effects.DE<- function(filename, title, colors){
data <- load.dataset(filename)
bots.with <- filter(data, "data.set", "DE 2013-05 without bot filtering")
bots.with.given1 <- only.given.1(bots.with)
bots.with.allbut1 <- only.all.but.1(bots.with)
bots.without <- filter(data, "data.set", "DE extra bot filtering")
@Velrok
Velrok / gist:6379635
Created August 29, 2013 15:33
XMPP log. Bot is not responding to messages :( . Don't know why.
Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xmpp/client.py
DEBUG: flags defined: always,nodebuilder
DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance at 0x10595de18> into <xmpp.client.Client instance at 0x10595dd88>
DEBUG: socket warn Could not load one of the supported DNS libraries (dnspython or pydns). SRV records will not be queried and you may need to set custom hostname/port for some servers to be accessible.\n
DEBUG: socket start Successfully connected to remote host ('jabber.de', 5222)
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher instance at 0x10595def0> into <xmpp.client.Client instance at 0x10595dd88>
DEBUG: dispatcher info Registering namespace "unknown"
@Velrok
Velrok / btsync.conf
Created August 27, 2013 20:46
My btsync upstart script.
setuid xbmc
setgid xbmc
start on virtual-filesystem
expect fork
exec /home/xbmc/bin/btsync
respawn
@Velrok
Velrok / core.clj
Last active December 19, 2015 15:49
core async performance testing using a factorial function and different implementations
(ns async-test.core
(:use [clojure.core.async]))
(defn !
([n]
(! 0 n))
([sum n]
(if (zero? n)
sum
layout title date comments categories
post
Clojure Lesson Learned
2013-07-04 18:45
true

background

HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 6c86594755fc811faa06d7ac1827d7246c365f12
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.4-x86_64
Xcode: 4.6.3
Error: uninitialized constant MacOS::CLT::STANDALONE_PKG_PATH
Please report this bug:
@Velrok
Velrok / remove-merged-branches.sh
Last active December 19, 2015 04:49
Deletes all git branches that are already merged into master.
git branch --merged master | grep -v 'master$' | xargs git branch -d
@Velrok
Velrok / sleep.applescript
Created June 30, 2013 23:40
Apple Script -> Sleep
tell application "Finder"
sleep
end tell
@Velrok
Velrok / all-paralell.clj
Created June 28, 2013 22:15
I indendet to see how to use fold to utilize pralell processing just to see that its prallel without the use of fold and pmap :/
(ns reducers.core
;(:require [clojure.core.reducers :as r])
)
(def N (iterate inc 0))
(def finish 6e6)
; this is just for testing if a random map function will stop the parelleltiy
(defn only-even [x]