Skip to content

Instantly share code, notes, and snippets.

View freddii's full-sized avatar

freddii

  • 127.0.0.1
View GitHub Profile
@zoide
zoide / ympd start script
Last active May 12, 2016 08:01
Debian start script for ympd.
# Setup:
# 1. Put ympd in /usr/local/sbin/
# 2. Put the code in /etc/init.d/ympd
# 3. chown +x /etc/init.d/ympd
# 4. edit: /etc/default/ympd and add your arguments to ympd.
# Example: DAEMON_ARGS="--webport 80 --user mpd"
# 5. Run: update-rc.d ympd defaults
#! /bin/sh
### BEGIN INIT INFO
@Alex1Git
Alex1Git / sunrise sunset calculation
Last active December 20, 2018 09:00
sunrise sunset calculation / Berechnung Sonnenaufgang und Sonnenuntergang
# Formel von Dr. Roland Brodbeck, Calsky
# http://lexikon.astronomie.info/zeitgleichung/neu.html
# Uebertragung auf Python 3 von Alexander Klupp 2014-01-14
import math
pi2 = 2*math.pi
pi = math.pi
RAD = math.pi/180