Skip to content

Instantly share code, notes, and snippets.

View joshainglis's full-sized avatar
:octocat:

Josha Inglis joshainglis

:octocat:
View GitHub Profile
@joshainglis
joshainglis / sign_s3_url.sql
Created December 17, 2019 02:42 — forked from darknoon/sign_s3_url.sql
A function that lets you sign S3 urls for viewing from within your database queries
-- This function is based on this description:
-- https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html
CREATE OR REPLACE FUNCTION
sign_s3_url(
m_host text,
m_resource text,
m_region text,
m_key text,
m_secret text,
@joshainglis
joshainglis / daemon.md
Last active August 29, 2015 14:17 — forked from andreif/daemon.md

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.