Skip to content

Instantly share code, notes, and snippets.

View philippkueng's full-sized avatar

Philipp Küng philippkueng

View GitHub Profile
@philippkueng
philippkueng / blogengine_install.sh
Created July 10, 2011 12:48
A script to install BlogEngine.NET with Mono and Apache on a fresh Ubuntu 10.04 LTS install.
# Variables
LOGFILE=/root/blogengine_install.log
echo
echo
echo "Preparing Server for ASP.NET"
echo "############################"
echo
@philippkueng
philippkueng / core.clj
Created April 28, 2014 16:35
Fetch & write a binary file using Clojure and clj-http
(ns the-namespace.core
(:require [clj-http.client :as client]
[clojure.java.io :as io]))
(defn- fetch-photo!
"makes an HTTP request and fetches the binary object"
[url]
(let [req (client/get url {:as :byte-array :throw-exceptions false})]
(if (= (:status req) 200)
(:body req))))