Skip to content

Instantly share code, notes, and snippets.

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:
layout title date comments categories
post
Clojure Lesson Learned
2013-07-04 18:45
true

background

@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
@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 / 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 / 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 / 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 / big-data.bib
Created October 2, 2013 13:09
all my latex references are suddenly broken
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for Waldemar S at 2013-10-02 14:53:53 +0200
%% Saved with string encoding Unicode (UTF-8)
@Velrok
Velrok / goto-sleep.sh
Created October 30, 2013 00:28
A bash script for mac that uses an apple script to put the mac to sleep without the need to enter the password.
#!/bin/bash
if [ -n "$1" ]
then
minutes=$(($1 * 60))
echo "going to sleep in $1 minutes"
sleep $minutes
fi
echo "sleeping now"
osascript -e 'tell app "Finder" to sleep'
@Velrok
Velrok / .ctags
Created May 13, 2014 09:49
ctags file with rudementary clojure support.
--recurse=yes
--tag-relative=yes
--exclude=.git
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn-?[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/