This file contains hidden or 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
#!/bin/sh | |
# Refuse to commit files with the string ZZZ present | |
# I frequently use ZZZ to mark a spot where I'm working on an issue so I can come back to it | |
# | |
NOCOMMIT="ZZZ" | |
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | cut -c3-) | |
if [ "$files" != "" ] |
This file contains hidden or 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
# From https://stackoverflow.com/a/68876046/1319998, which is itself inspired by https://stackoverflow.com/a/68814418/1319998 | |
from contextlib import contextmanager | |
from collections import namedtuple | |
from ctypes import cdll, byref, string_at, c_char_p, c_int, c_double, c_int64, c_void_p | |
from sys import platform | |
def query(db_file, sql, params=()): | |
libsqlite3 = cdll.LoadLibrary({'linux': 'libsqlite3.so', 'darwin': 'libsqlite3.dylib'}[platform]) |
This file contains hidden or 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
CREATE TABLE ZADDITIONALASSETATTRIBUTES ( | |
Z_PK INTEGER PRIMARY KEY, Z_ENT INTEGER, | |
Z_OPT INTEGER, ZALLOWEDFORANALYSIS INTEGER, | |
ZCAMERACAPTUREDEVICE INTEGER, ZCLOUDAVALANCHEPICKTYPE INTEGER, | |
ZCLOUDGROUPINGSTATE INTEGER, ZCLOUDKINDSUBTYPE INTEGER, | |
ZCLOUDRECOVERYSTATE INTEGER, ZCLOUDSTATERECOVERYATTEMPTSCOUNT INTEGER, | |
ZDESTINATIONASSETCOPYSTATE INTEGER, | |
ZEMBEDDEDTHUMBNAILHEIGHT INTEGER, | |
ZEMBEDDEDTHUMBNAILLENGTH INTEGER, | |
ZEMBEDDEDTHUMBNAILOFFSET INTEGER, |