Skip to content

Instantly share code, notes, and snippets.

View derrekbertrand's full-sized avatar

Derrek Bertrand derrekbertrand

View GitHub Profile
@derrekbertrand
derrekbertrand / daemon.py
Created September 26, 2017 13:29 — forked from josephernest/daemon.py
Daemon for Python
# From "A simple unix/linux daemon in Python" by Sander Marechal
# See http://stackoverflow.com/a/473702/1422096
#
# Modified to add quit() that allows to run some code before closing the daemon
# See http://stackoverflow.com/a/40423758/1422096
#
# Joseph Ernest, 2016/11/12
import sys, os, time, atexit
from signal import signal, SIGTERM
@derrekbertrand
derrekbertrand / gist:5759101
Last active December 18, 2015 09:09 — forked from vshvedov/gist:1370650
Install Sublime Text 2 via PPA on Debian/LMDE
sudo apt-get install python-software-properties software-properties-common
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text