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 / gist:1700292
Created January 29, 2012 19:35
R-SBB-timetables-spider Error Log
iMac:R-SBB-timetables-spider philippkueng$ rake station:set_bounds bounds=8.53,47.41,8.61,47.46 --trace
** Invoke station:set_bounds (first_time)
** Execute station:set_bounds
rake aborted!
undefined method `path' for #<StringIO:0x007fcbdbbb7480>
/Users/philippkueng/Documents/Programming/Ruby/R-SBB-timetables-spider/scripts/station.rb:153:in `findStationsInArea'
/Users/philippkueng/Documents/Programming/Ruby/R-SBB-timetables-spider/Rakefile:131:in `block (2 levels) in <top (required)>'
/Users/philippkueng/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/philippkueng/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/philippkueng/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
<html>
<head>
<title></title>
<script type="text/javascript" language="JavaScript">
function toggleMe02(a){
AlleAus02();
@philippkueng
philippkueng / Gemfile
Created May 12, 2013 16:01
Die Sonntagszeitung, durch Barnaby Skinner & Julian Schmidli, hat eine Visualisierung der Bundes-Direktzahlungen an Bauern des Jahres 2011 aufgeschaltet. Leider konnten die zugrundeliegenden Rohdaten noch nicht publiziert werden, siehe http://storify.com/philippkueng/direktzahlungen-an-bauern-in-der-schweiz-im-jahr-2. Das Rakefile (und das darau…
source "https://rubygems.org"
gem "rake", ">= 0.9.2.2"
gem "roo", "1.11.1"
gem "mechanize", "2.6.0"
@philippkueng
philippkueng / provision.sh
Created May 20, 2013 20:58
a simple shell script to convert an ubuntu 12.04 x64 image running on digitalocean or linode into a full fledged CKAN instance (unsecure, but enough for demo purposes)
echo "this shell script is going to setup a running ckan instance based on the CKAN 2.0 packages"
echo "switching the OS language"
locale-gen
export LC_ALL="en_US.UTF-8"
sudo locale-gen en_US.UTF-8
echo "updating the package manager"
sudo apt-get update
@philippkueng
philippkueng / Vagrantfile
Created July 27, 2013 12:52
A recipe to create a vagrant box image with the newest Emacs 24, nrepl and Leiningen for Cascalog development
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.synced_folder ".", "/vagrant"
end
@philippkueng
philippkueng / sync.sh
Last active December 24, 2015 21:09
Script to rsync all the resources from the first semester of CS at HSR
#!/bin/bash
# Before running
# --------------
#
# 1. Clone this repo
# 2. Mount smb://c206.hsr.ch/skripte on a Mac
# HS13
# rsync -avz /Volumes/skripte/Informatik/Fachbereich/Computernetze_1/ .
@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))))
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from
# https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/293340d67522b11a847438c45a4ee7b5
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
@philippkueng
philippkueng / cloud-config.yaml
Last active August 29, 2015 14:03
Creating a Docker Application
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from
# https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/f3b743dac73a950101567222fe38620e
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001