View README.txt
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
The following process is rather tedious but removes headaches from dealing with merge conflicts due to using a historically timed commit | |
When starting stacked work: | |
- git status # On pr1 branch | |
- git checkout main | |
- git checkout -b pr2.base # This will act as base for easy PR review and merge conflict resolution | |
- git checkout pr1 -p # Pull over all changes from pr1 into a single commit, including file deletion (git checkout -- . would miss this) (single commit removes noisy git history from PR) | |
- git commit -m "Single commit containing pr1 changes" | |
- git checkout -b pr2 | |
- # Work on pr2 |
View main.py
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
# https://github.com/python/cpython/blob/v3.10.2/Lib/tempfile.py#L782-L852 | |
class PersistableTemporaryDirectory(tempfile.TemporaryDirectory): | |
def __init__(self, *args, persist: bool, **kwargs): | |
self.persist = persist | |
ret_val = super().__init__(*args, **kwargs) | |
# If we're persisting, then remove `weakref` binding for cleanup at garbage collection | |
if self.persist: | |
self._finalizer.detach() | |
return ret_val |
View main.py
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
# Last updated: 2022-01-04 | |
def is_valid_tipalti_name(name): | |
# https://support.tipalti.com/Content/Topics/Development/APIs/PayeeAPI/UpdatePayee/CreatePayeeInfoAutoIdap/Intro.htm#PayeeDetailsItem1 | |
# Max length: 70 -- Incorrect: During testing it's 35 characters... | |
# Latin and numeric (cannot be only numeric) | |
# Spaces, periods, dashes (cannot be the first character)—e.g., "Mary Jo", "Jr.", "Mary-Jo" | |
# We've found additional cases like "Test 4" which fail, see tests for robust overview | |
# Their API truncates names at 35 characters | |
# This is fine for our use case and we won't reject a name for being too long |
View index.js
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
const polygonClipping = require('polygon-clipping'); | |
const poly1 = [ | |
[ | |
[-89.6913437618266, 32.5917775294804], | |
[-89.6913424001509, 32.5873713360798], | |
[-89.6913420772531, 32.5863246737333], | |
[-89.6932638650491, 32.5863115360137], | |
[-89.6932452075745, 32.5843574521187], | |
[-89.6951228354689, 32.584358882942], |
View .gitignore
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
node_modules/ |
View .gitignore
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
output.ods | |
.~lock* |
View ods-hyperlink.sh
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/env bash | |
# Add hyperlinks to a LibreOffice Calc file | |
# We appreciate https://ask.libreoffice.org/en/question/81492/convert-clickable-hyperlink-to-viewable-url/ | |
# but don't want to handwrite the action every time nor trust a macro (though I guess a bash script isn't much better) | |
# Intended to be used on `.ods` with no hyperlinks at all, would need XML parser otherwise | |
# More recent version might exist in https://github.com/twolfson/dotfiles but no promises | |
# Exit on first error, unset variable, or pipe failure | |
set -euo pipefail |
View .gitignore
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
.pio/ | |
include/ | |
lib/ | |
src/ | |
test/ |
View .gitignore
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
node_modules/ |
View .gitignore
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
.pio/ | |
include/ | |
lib/ | |
src/ | |
test/ |
NewerOlder