This file contains 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
class TurbolinksMiddleware(object): | |
""" | |
Send the `Turbolinks-Location` header in response to a visit that was redirected, | |
and Turbolinks will replace the browser's topmost history entry. | |
""" | |
def __init__(self, get_response): | |
self.get_response = get_response | |
def __call__(self, request): |
This file contains 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/python | |
from AppKit import NSWorkspace, NSBundle, NSRunningApplication | |
import sys | |
# app to look for and launch if not running | |
app_name = 'OneDrive' | |
app_bundle_id = 'com.microsoft.OneDrive' | |
# hide the python rocket ship |
NewerOlder