Skip to content

Instantly share code, notes, and snippets.

View akluth's full-sized avatar
🟢
Per aspera ad astra et caritas omnia potest.

Alexander Kluth akluth

🟢
Per aspera ad astra et caritas omnia potest.
  • The Associated Engineers Group Germany
  • Germany
  • 11:19 (UTC +02:00)
View GitHub Profile
# install prerequisites
sudo apt-get update -qq >/dev/null
sudo apt-get install -qq -y apt-transport-https
# install docker
wget -nv -O - https://get.docker.com/ | sh
# install dokku
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
OS_ID="$(lsb_release -cs 2>/dev/null || echo "trusty")"
@akluth
akluth / MinimalAnnotationParser.php
Last active August 29, 2015 13:58
Minimal annotation parser
<?php
/**
* Minimal and very simple annotation parser.
*/
class AnnotationParser
{
static $ANNOTATION_NAME = 1;
static $ANNOTATION_VALUE = 2;
static private $reflector;
<?php
/**
* Minimal and very simple annotation parser.
*
* For examples, look at the doc comments beneath.
*
* Licensed under the terms and conditions of the MIT license.
*
* @author Alexander Kluth <contact@alexander.kluth.com>
*/
#!/usr/bin/perl
#
use strict;
use warnings;
use LWP::Simple;
use JSON;
my $json = get("https://api.github.com/users/deralex/repos");
my $data = decode_json($json);
@akluth
akluth / .vimrc
Created September 13, 2013 11:37
.vimrc
if $TERM == "xterm-256color"
set t_Co=256
endif
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
@akluth
akluth / array.coffee
Created May 2, 2013 20:08
CoffeeScript: JSON-Objects, Arrays
# Considering an JSON object like this one:
#
# {
# "store": {
# "foo": {
# "value":"bar"
# }
# },
# "anotherstore": {
# "wat":{
6 module.exports =
7 flush: (storename) ->
8 content = store.store()
9
10 try
11 log.message 'Writing store' + storename '...'
12 fs.writeFileSync storename, content, 'utf8'
13 true
14 catch e
15 log.failure e
@akluth
akluth / service.yml
Created November 18, 2012 17:02
Service-Definition Nuria-Project
---
service:
version: 1
name: IRC
icon: icon.png
description: "This is an awesome IRC-Client!"
short: "IRC-Client"
license: BSD
license-url: google.com/search?q=BSD
author: Nuria-Project
@akluth
akluth / gist:3872625
Created October 11, 2012 14:16 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;