Skip to content

Instantly share code, notes, and snippets.

View mattshirtliffe's full-sized avatar
🐇
Software Engineer & Co-founder of Studio 200

Matthew Shirtliffe mattshirtliffe

🐇
Software Engineer & Co-founder of Studio 200
View GitHub Profile
@mattshirtliffe
mattshirtliffe / 10-automount.rules
Created February 17, 2020 16:01 — forked from ramnes/10-automount.rules
Automatically mount USB storages when plugged
KERNEL!="sd[b-z][0-9]", GOTO="automount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
@mattshirtliffe
mattshirtliffe / .gitconfig
Created April 26, 2017 10:49 — forked from NamPNQ/.gitconfig
Pycharm as a default git difftool and git mergetool. Add the following to ~/.gitconfig
[diff]
tool = pycharm
[difftool "pycharm"]
cmd = /usr/local/bin/charm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read
[merge]
tool = pycharm
keepBackup = false
[mergetool "pycharm"]
cmd = /usr/local/bin/charm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
@mattshirtliffe
mattshirtliffe / blinker_signal.py
Created April 10, 2017 16:45 — forked from doobeh/blinker_signal.py
Blinker/Signal Flask Example
from flask import Flask, current_app
from blinker import Namespace
app = Flask(__name__)
app.secret_key = 'WOO'
my_signals = Namespace()
def moo_signal(app, message, **extra):
@mattshirtliffe
mattshirtliffe / nginxproxy.md
Created March 15, 2017 15:30 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@mattshirtliffe
mattshirtliffe / 0_reuse_code.js
Last active August 26, 2015 07:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console