This is now OBSOLETE, it has been moved into CommCare HQ.
This example upgrades PostgreSQL 9.4 to 9.6. Substitute the versions you're upgrading to/from as needed below.
Run the following command to make a backup of all postgres data in a local file:
| // ==UserScript== | |
| // @name Clockify - hide PTO | |
| // @description Hides PTO cards in Clockify time tracker. Requested/future PTO takes up a lot of space at the top of the time tracker, which pushes today's time entries down in the list. This script hides PTO entries by default, and adds a button to toggle their visibility. | |
| // @version 1.5 | |
| // @include https://dimagi.clockify.me/tracker* | |
| // @grant none | |
| // ==/UserScript== | |
| // | |
| // Mostly written by ChatGPT with minor modifications. | |
| // Source: https://gist.github.com/millerdev/571f894f7b71b55168fab694d636f125 |
| # Pratt Parser in Python | |
| # https://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/ | |
| # | |
| # Works with input like `a + b`. | |
| # The lexer does not support numbers (yet). | |
| # | |
| # https://gist.github.com/millerdev/03d881620dd0879d4347b0e971ff0be5 | |
| from dataclasses import dataclass |
| /* | |
| Gnome 3 - based on https://blog.samalik.com/make-your-gnome-title-bars-smaller/ | |
| https://securitronlinux.com/bejiitaswrath/how-to-make-the-title-bars-in-gnome-shell-much-thinner-than-the-default/ | |
| sizes tweaked to make the close button bigger on 20.04 (not tested on earlier versions) | |
| Copy or symlink to ~/.config/gtk-3.0/gtk.css | |
| To change titlebar font from Bold to normal (maybe there is CSS for this too?): | |
| $ gsettings get org.gnome.desktop.wm.preferences titlebar-font | |
| 'Ubuntu Bold 12' |
| #! /usr/bin/env python | |
| """Download events form Sentry as CSV | |
| https://gist.github.com/millerdev/3d0a541f90b9817c3be5dd9bffed288e | |
| """ | |
| import sys | |
| import csv | |
| from argparse import ArgumentParser | |
| import requests |
| #! /usr/bin/env python | |
| """Remove __future__ imports from Python files | |
| Acts on *.py files in the current directory and all subdirectories. | |
| Only removes lines in which all imported names are in KNOWN_FUTURES. | |
| Public URL of this script: | |
| https://gist.github.com/millerdev/f71648c1a9690cfca7c8b7c049867cfc | |
| """ |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| """ | |
| DEPRECATED moved to | |
| https://github.com/dimagi/commcare-hq/blob/master/corehq/apps/couch_sql_migration/management/commands/couch_domain_report.py | |
| Categorize CommCare HQ domains needing couch -> sql migration of forms and cases | |
| This script requires a domains.csv file, which can be obtained by following | |
| these steps: |
| #! /usr/bin/env python3 | |
| """Permanently delete messages from Gmail | |
| WARNING: THIS SCRIPT CAN DO GREAT DAMAGE TO YOUR GMAIL ACCOUNT. | |
| USE AT YOUR OWN RISK! | |
| Setup guide: | |
| 1. Create and activate a new virtualenv with Python 3 |
This is now OBSOLETE, it has been moved into CommCare HQ.
This example upgrades PostgreSQL 9.4 to 9.6. Substitute the versions you're upgrading to/from as needed below.
Run the following command to make a backup of all postgres data in a local file:
| #! /usr/bin/env python | |
| """Generate XLSX file containing CommCare locations | |
| Requires: pip install openpyxl==2.2.5 | |
| https://gist.github.com/millerdev/57a5c1363773a92d9ee6332e79789cd3 | |
| """ | |
| from __future__ import unicode_literals | |
| from __future__ import print_function | |
| from __future__ import division |
| #! /usr/bin/env python | |
| """ | |
| Check for replicas on distinct nodes within a riak cluster for a given n_val | |
| https://gist.github.com/millerdev/b6f50640d5fc2519ae8c9c2de3c64af2 | |
| """ | |
| import re | |
| from argparse import ArgumentParser | |
| from subprocess import check_output |