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
| def excepthook(*exc_info): | |
| """Log the traceback if program throws an unhandled exception.""" | |
| exc_type, exc_value, exc_traceback = exc_info | |
| exc_time = time.time() | |
| msg = f"{exc_type.__name__} @ {exc_time}" | |
| logging.critical(f"{msg}. Traceback ↓", exc_info=exc_info) | |
| logging.critical(f"{msg}. Traceback ↑") | |
| sys.excepthook = excepthook |
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
| {"label":"wikidata refreshed","message":"2026-08-05","schemaVersion":1,"color":"blue"} |
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
| #!/usr/bin/env zsh | |
| # Save a clipboard image using pngpaste, with optional oxipng optimization. | |
| # | |
| # Exit statuses: | |
| # 0 Image saved successfully | |
| # 1 Image could not be saved or the operation was cancelled | |
| # 2 Invalid command-line usage | |
| emulate -L zsh |
OlderNewer