Skip to content

Instantly share code, notes, and snippets.

View quentinsf's full-sized avatar

Quentin Stafford-Fraser quentinsf

View GitHub Profile
@jsanchezpando
jsanchezpando / middleware.py
Created December 20, 2012 09:38
Simple Django super class to track user and save creator and modifier of a Model.
from myapp.utils import set_current_user
class CurrentUserMiddleware:
def process_request(self, request):
set_current_user(getattr(request, 'user', None))
@redsweater
redsweater / SwitchProfile
Created October 12, 2011 15:35
If you use ScanSnap, you can have GUI Scripting automate the process of switching among your scan profiles ...
-- Launches ScanSnap Manager, if necessary. Opens the ScanSnap Manager settings window,
-- changes to named profile, applies changes, and closes the window
-- Example:
SwitchToProfile("Standard")
on SaveActiveApplication()
return application
end SaveActiveApplication
on OpenOptionsWindow()