Skip to content

Instantly share code, notes, and snippets.

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]

Hi.

Though this isn't an Adcloud Event, we're mailing you because it's the same workshop we held last month at Adcloud. (Previously, we didn't have space for all the interested people.)

So if you are still interested, we will repeat an (improved) workshop this Thursday at the Cologne Clojure User Group.

Feel free to join us:

On Google Plus: https://plus.google.com/events/c1volcdbebka7e9t27phh8mdjdk

@Velrok
Velrok / invitation.md
Last active December 18, 2015 14:19
Clojure Intro Workshop email text.

Hi.

Also this is not an Adcloud Event, we are mailing you, because it's the same workshop we held last month at Adcloud. Due to limited space capacities we could not fitt in all the people that where interessted.

So if you are still interessted, we will repeat a improved version of the workshop this thursday at the Cologne Clojure User Group.

Feel free to join us:

https://plus.google.com/events/c1volcdbebka7e9t27phh8mdjdk

@Velrok
Velrok / incanter_extensions.clj
Created June 14, 2013 13:01
A collection of methods related to incanter datasets that I found myself writing.
(ns athena.incanter-extensions
(:use [incanter.core :only [head $ $where nrow dataset? to-dataset]])
(:import [java.lang Math]))
(defn tail
"Like incanter.core/head but returning the tail."
([mat] (tail 10 mat))
([len mat]
(let [upper-bound (nrow mat)
@Velrok
Velrok / what-to-move-to-let.clj
Created June 6, 2013 14:10
Some example code to answer the question of when to move results into a let.
;; using a let to store intermediat results
(defn recommendations [scores user]
(let [user-row (.viewRow (:matrix scores)
(get (:row-mapping scores)
user))
sorted-by-score (sort-by #(get % 1)
(non-zero user-row))]
(map (fn [[item, score]]
{:item item, :score score})
sorted-by-score)))
@Velrok
Velrok / send_xbmc_nitification.json
Created May 26, 2013 14:54
Example post content for XBMC notifications.
/* Send this to http://<IP>:<PORT>/jsonrpc
Also set header:
Content-Type: application/json
*/
{"jsonrpc":"2.0",
"method": "GUI.ShowNotification",
"params": {"title": "Twitter Username",
"message": "Example Message.",
"image": "preview_image_url",
"displaytime": 25000},