Skip to content

Instantly share code, notes, and snippets.

@pboehm
pboehm / et.rb
Last active December 22, 2015 02:38
#!/usr/bin/env ruby
# encoding: utf-8
data = [
[ "elektr. Spannung ", "U ", "1V" ],
[ "elektr. Strom ", "A ", "1A" ],
[ "elektr. Widerstand ", "Ω ", "1Ω ", "R=U/I" ],
[ "Dielektrizitätskonstante ", "ɛ ", "As/Vm" ],
[ "elektr. Ladung ", "Q ", "1As" ],
[ "elektr. Linienladungsdichte ", "τ ", "As/m" ],
@pboehm
pboehm / schema.xml
Last active December 16, 2015 16:59
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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
# put these lines into your .[bash|zsh]rc file and start a new shell
alias feature="git checkout -b"
function merge_with_master {
branch_name=$(git branch | grep "*" | sed "s/* //")
test $branch_name = "master" &&\
echo "Already on master, checkout your feature branch" && return
git checkout master
grep "origin" .git/config > /dev/null && git pull
git merge --ff-only $branch_name && git branch -d $branch_name \
From fd8c2f000f6d84cba8db8a76e2590a40c34574b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20B=C3=B6hm?= <[email protected]>
Date: Thu, 17 Jan 2013 17:12:45 +0100
Subject: [PATCH] Added global_namespace flag to API
You can now create projects in the global namespace through the API.
This is made by introducing an optional field `global_namespace` to the
method that responds to 'POST /projects'.
---
lib/api/projects.rb | 10 ++++++++++
@pboehm
pboehm / mediatomb.sql
Created January 3, 2013 21:27
SQL query that extracts your watched episodes from the mediatomb db
SELECT
(SELECT location
FROM mt_cds_object
WHERE id = m.ref_id) as episode_path
FROM mt_cds_object m
WHERE ref_id is not null
AND episode_path LIKE "%/pi/Queue/%"
AND flags != 1
ORDER BY episode_path;
@pboehm
pboehm / config.xml
Last active December 10, 2015 11:29
working ,mediatomb config running on raspbian, you can update the import.js file with a different import structure
<?xml version="1.0" encoding="UTF-8"?>
<config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
<server>
<ui enabled="yes" show-tooltips="yes">
<accounts enabled="no" session-timeout="30">
<account user="mediatomb" password="mediatomb"/>
</accounts>
</ui>
<name>MediaTomb RPi</name>
@pboehm
pboehm / gist:4067475
Created November 13, 2012 18:24
Raspberry Pi sharehoster download stuff
# plowshare
Add in your /etc/apt/sources.list:
deb http://mcrapet.free.fr/debian/ unstable/
# unrar
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=11389
@pboehm
pboehm / seriesindex.xml
Last active February 7, 2020 07:26
Index that holds information about watched episodes and series
<?xml version="1.0" encoding="UTF-8"?>
<seriesindex>
<series name="2 Broke Girls">
<episodes lang="de">
<episode name="S01E01 - Reboot in Brooklyn.mkv"></episode>
<episode name="S01E02 - Private Grenzen.mkv"></episode>
<episode name="S01E03 - Shopping Krieg.mkv"></episode>
<episode name="S01E04 - Die Probleme der Reichen.mkv"></episode>
<episode name="S01E05 - Schuldenkrise.mkv"></episode>
<episode name="S01E06 - Das Schrankbett.mkv"></episode>
@pboehm
pboehm / main_a1.s82
Created August 7, 2012 21:30
Lösungen für Aufgaben im Assemblerpraktikum
/******************************************************************************
* Projekt Template für einen Versuch im Assemblerpraktikum *
* *
* Versuch-Nr.: 1 (Digital-Voltmeter) *
* Gruppen-Nr.: *
* *
* Mitglieder der Gruppe:
* - Philipp Böhm
* - Mathias Perlet
*
@pboehm
pboehm / 99wlan
Created May 25, 2012 18:03
Wifi enable/disable script that will be called from NetworkManager
#!/bin/bash
#
# Script that disables your wifi if a wired connection turns on
# and it reenabkes wifi if the wired connection is going down.
#
# should be placed in /etc/NetworkManager/dispatcher.d/ and should
# be executable
if [[ -n `echo $1 | grep "em*"` ]]; then
case "$2" in