This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Based off of code written by Sander Marechal, which was released into public | |
# domiain. | |
# http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ | |
# | |
import sys, os, time, atexit | |
import logging | |
from signal import SIGTERM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from fcntl import LOCK_EX | |
from fcntl import LOCK_NB | |
from fcntl import flock | |
from time import sleep | |
NO_BLOCK = 'nb' | |
BLOCK = 'block' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import argparse | |
import requests | |
from oauth2 import Consumer | |
from oauth2 import Request | |
from oauth2 import SignatureMethod_HMAC_SHA1 | |
from oauth2 import generate_nonce |