Skip to content

Instantly share code, notes, and snippets.

View fbartels's full-sized avatar

Felix Bartels fbartels

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fbartels on github.
  • I am fbartels (https://keybase.io/fbartels) on keybase.
  • I have a public key ASDVGgpkWVDmZpJDH08J0oQSlyAXBcwAPRY4Wsj19_FbBAo

To claim this, I am signing this object:

@fbartels
fbartels / name.sh
Created December 14, 2018 07:31 — forked from josephok/name.sh
Generate a random name based on https://randomuser.me/api/
#!/usr/bin/env bash
which jq &> /dev/null
if [[ $? -ne 0 ]]
then
echo "Please install jq first, see https://stedolan.github.io/jq/"
exit 1
fi
name=$(curl -s https://randomuser.me/api/?inc=name)
@fbartels
fbartels / db-find-missing-attachments.pl
Last active March 12, 2018 10:44 — forked from bkram/db-find-missing-attachments.pl
perl db-find-missing-attachments.pl /etc/kopano/server.cfg
#!/usr/bin/perl -w
use strict;
use DBI;
my $L1 = 10;
my $L2 = 20;
sub do_error($) {
exit(1);
@fbartels
fbartels / 00-button
Last active March 25, 2016 11:22 — forked from abstrask/00-button
Scripts for OpenWrt on TP-Link TL-MR3020 to change network configs using 3-position sliding switch
# based on
# https://dev.openwrt.org/browser/trunk/target/linux/atheros/base-files/etc/hotplug.d/button/00-button
# https://forum.openwrt.org/viewtopic.php?pid=172110#p172110
. /lib/functions.sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
do_button () {
local button
@fbartels
fbartels / SimpleHTTPServerWithUpload.py
Last active March 3, 2016 06:36 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@fbartels
fbartels / zarafa-client
Created July 29, 2014 18:49
Apache vHost of all you local zarafa msi files (directory is used for Zarafa auto-update mechanism)
Alias /zarafa-client /var/lib/zarafa/client/
<Directory /var/lib/zarafa/client/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
#!/volume1/@appstore/python/bin/python
import datetime, os, json
# Write upcoming Tvheadend recording start dates to Synology power scheduler
# i.e. turn on your Synology so Tvheadend can record.
# Usage: ./pvr_poweron.py > /etc/power_sched.conf (or use cron)
# location of Tvheadend PVR-schedule files:
PVR_DIR="/usr/local/tvheadend/var/dvr/log"
# Day-code constants for power scheduler Monday-Sunday: