Skip to content

Instantly share code, notes, and snippets.

View maurizi's full-sized avatar

Michael Maurizi maurizi

View GitHub Profile
@maurizi
maurizi / mikes-timesheet-improvements.user.js
Last active March 15, 2019 18:23
Mike's Timesheet Improvements
// ==UserScript==
// @name Mike's timesheet improvements
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Add plus time buttons to the new GetMyTime
// @author Michael Maurizi
// @match https://app.getmytime.com/timesheet.aspx
// @grant none
// ==/UserScript==
@aisayko
aisayko / bulk_upsert.py
Last active May 8, 2022 23:53
Postgresql bulk upsert in Python (Django)
def bulk_upsert(model, fields, values, by):
"""
Return the tuple of (inserted, updated) ids
"""
result = (None, None)
if values:
stmt = """
WITH data_set AS (
INSERT INTO %s (%s)
@maurizi
maurizi / branches-into-links.user.js
Created July 11, 2016 22:30
Turn Github Branch names into links
@maurizi
maurizi / swipe-to-archive-for-inbox.user.js
Last active December 17, 2015 17:22
Adds swipe to archive gestures for Google's Inbox
// ==UserScript==
// @name Swipe to Archive for Inbox
// @namespace maurizi.org
// @description Swipe to Archive for Google's Inbox
// @include https://inbox.google.com/
// @include https://inbox.google.com/u/0/
// @include https://inbox.google.com/u/1/
// @include https://inbox.google.com/u/2/
// @include https://inbox.google.com/u/3/
// @include https://inbox.google.com/u/4/
@maurizi
maurizi / ansible-galaxy.bat
Last active December 16, 2022 11:34
Running Ansible on Windows
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*