Skip to content

Instantly share code, notes, and snippets.

View gsumpster's full-sized avatar

George Sumpster gsumpster

View GitHub Profile
@gsumpster
gsumpster / delete_screenshots.py
Last active July 4, 2017 19:50
Detects screenshots on MacOS and moves them to the trash, included launchd config too put this in ~/Library/LaunchAgents
from os import listdir, environ, rename
from os.path import isfile, join
from re import compile, search
regex = compile("Screen Shot \d{4}-\d{2}-\d{2} at \d{1,2}.\d{2}.\d{2} [AM PM]{2}")
def isScreenshot(f):
return search(regex, f)
files = [f for f in listdir(environ['HOME'] + '/Desktop') if isfile(join(environ['HOME'] + '/Desktop', f))]
@gsumpster
gsumpster / nginx.conf
Created April 20, 2017 19:33
Grav - Ubuntu 16.04 NGINX Configuration
server {
listen 80;
index index.html index.php;
## Begin - Server Info
root /home/grav/www/html;
server_name localhost;
## End - Server Info
## Begin - Index # for subfolders, simply adjust the rewrite: # to use `/subfolder/index.php`