Skip to content

Instantly share code, notes, and snippets.

View philippkueng's full-sized avatar

Philipp Küng philippkueng

View GitHub Profile
#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
@philippkueng
philippkueng / README.md
Last active August 29, 2015 14:05
Convert all video files in a directory recursively to mp4 files of max size 4GB
@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 / get_configs_of_all_heroku_apps.sh
Created July 3, 2016 15:35
get all configuration details of all the heroku apps one has access to
#!/bin/bash
# 1. List all the Apps
# 2. Remove the titles
# 3. Remove the empty lines
# 4. Only get the app-names (no regions or who the app belongs to)
# 5. Fetch the configuration for all the apps and print them
# 6. Use Ctrl+F to find the database entry one is looking for
for APP_NAME in $(heroku apps | grep -v "=== My Apps" | grep -v "=== Collaborated Apps" | grep . | awk '{print $1;}'