Skip to content

Instantly share code, notes, and snippets.

View tfohlmeister's full-sized avatar

Thorben Fohlmeister tfohlmeister

View GitHub Profile
@tfohlmeister
tfohlmeister / Seafile Sync LDAP Users
Last active June 19, 2016 08:08
This python script takes a list of users (email adresses, in this case taken from a Zimbra user base) and compares them to the LDAPUsers table of Seafile. New users are added automatically, missing users are disabled. Update `seafile_pw` to match your connection and run this script as often as necessary. LDAP syncing users is usually a Seafile P…
#!/usr/bin/env python2
import MySQLdb
import sys
from subprocess import Popen, PIPE
def sqlexec(arg, *args):
cur = db.cursor();
try:
cur.execute(arg % args)
except Exception as e:
@tfohlmeister
tfohlmeister / README.md
Last active December 29, 2015 19:49
[dashing] Google Play Stats widget for Dashing!

Description

Dashing widget & job to display a whole lot of Google Play app statistics.

The widget is fully customizable to display only the information needed and is based on the list widget. It extends the base list by another value, making possible to display 2 values for each app beside its name.

A Dashing job fetches statistics for a given array of apps and uses the wonderful Market Bot to parse the Google Play page.

Google Play Stats

@tfohlmeister
tfohlmeister / README.md
Last active July 30, 2020 23:17
[dashing] Google Calendar Event widget for Dashing!

Description

Dashing widget to display a bunch of current and coming-up Google Calendar events.

The widget shows only one event and is based on the text-widget which is default in the Dashing installation. The time is displayed as human-readable time string with the help of MomentJS.

A Dashing job fetches the events of a given public or private calendar url, orders events to match starting time and sends the data to the dashboard. A certain event offset can be set for each calendar widget so that it will show the first (data-pre="0"), the second (data-pre="1") or any other following event based on the offset. For each calendar you'll have to define a name which enables you to assign custom background colors for events of each calendar.

While the main job is called in larger intervals, there is a second job to be run every minute or so, which kicks out already finished events. In that way processing load