Skip to content

Instantly share code, notes, and snippets.

@gbirke
gbirke / show_dw_meta.php
Last active March 27, 2016 09:48
Show DokuWiki meta files in shell
#!/usr/bin/env php
<?php
/**
* Show DokuWiki meta data on the command line
*
* @author Gabriel Birke <gb@birke-software.de>
*/
$file = $argv[1];
@gbirke
gbirke / NestedArrayConstraint.php
Created March 8, 2013 08:50
This PHPUnit constraint class is for applying another constraint to a value inside a nested array structure.
<?php
/**
* This constraint class is for applying another constraint to a value inside a nested array structure.
*
* When initializing this constraint you specify a "key path" - an array of keys, each accessing the next level of the
* array to check.
*
* @author Gabriel Birke <gb@birke-software.de>
*/
class NestedArrayConstraint extends PHPUnit_Framework_Constraint
@gbirke
gbirke / Zeitzonenumstellung
Last active December 15, 2015 17:59
Termine zur Zeitzonenumstellung -Dieses Skript berechnet die Daten der Zeitumstellung von MEZ und EDT und die jeweilige Zeitdifferenz
Termine zur Zeitzonenumstellung -Dieses Skript berechnet die Daten der Zeitumstellung von MEZ und EDT und die jeweilige Zeitdifferenz
@gbirke
gbirke / install-java.yml
Created January 8, 2014 10:13
Ansible playbook for installing Oracle Java 7 on Debian
# Ansible playbook to install Java 7 on Debian
#
# Thanks to http://www.sysadminslife.com/linux/howto-oracle-sun-java-7-installation-unter-debian-6-squeeze/
#
# Author: Gabriel Birke <gb@birke-software.de>
- hosts: devroot
vars:
java_download: http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.tar.gz
java_name: jdk1.7.0_45

Apache Proxy mit SSL-Client-Zertifikat für FHEM

Diese Anleitung beschreibt, wie ein Apache-Webserver als [Reverse Proxy][1] für eine [FHEM][2]-Installation eingerichtet wird. Bei der Einrichtung hatte ich folgende Ziele:

  • Erreichbarkeit von FHEM aus dem Internet (mit Host-Name per [Dynamic DNS][3])
  • Absichern der Kommunikation per SSL (mit selbst signiertem Zertifikat)
  • Zugriff ohne Passworteingabe, Absicherung per SSL-Client-Zertifikat

Disclaimer: Ich bin weder ausgewiesener Sicherheitsexperte noch Administrator, alle Tips hier habe ich mir aus diversen Tutorials zusammengesucht. Wer dringende Änderungswünsche oder Verbesserungsvorschläge hat, mailt an gb@birke-software.de

Voraussetzungen

  • Ein Raspberry Pi mit Raspbian oder die notwendige Intelligenz, alles was auf eurem System anders ist als unter Raspbian auch anders zu machen.
@gbirke
gbirke / ibeacon.sh
Created February 14, 2014 21:50
Init script for iBeacon
#!/bin/sh
### BEGIN INIT INFO
# Provides: ibeacon
# Required-Start: $bluetooth
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop Bluetooth iBeacon
### END INIT INFO
<?php
/*
* Copyright 2014 Paul Ferrett <paul@paulferrett.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@gbirke
gbirke / nthree2png.sh
Created July 7, 2014 15:54
Convert n3 file to PNG
#!/bin/bash
# Use the rdf2dot Python command (from the rdflib) to create a PNG from a graph
function usage {
echo "Usage: $0 input.n3 output.pn3"
exit
}
@gbirke
gbirke / composer-link
Created July 28, 2014 14:46
Ansible module for linking to vendor directories
@gbirke
gbirke / .conkyrc
Last active August 29, 2015 14:04
My Conky config
background yes
use_xft yes
xftfont 123:size=12
xftalpha 0.1
update_interval 0.5
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager