<a href="https://fitzypop.deno.dev" target="_blank" rel="noopener noreferrer">Fitzypop's Blog</a>
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 pathlib import Path | |
| def find_file(p: Path, file_name: str) -> Path | None: | |
| if p.is_file() and file_name in p.parts: | |
| return p | |
| for sp in [p, *p.parents]: | |
| candidate = sp / file_name | |
| if candidate.exists() and candidate.is_file(): |
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
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[codz] | |
| *$py.class | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python |
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
| -- Return a bool if enum exists | |
| CREATE OR REPLACE FUNCTION enum_exists(enum_name text, enum_schema text DEFAULT 'public') | |
| RETURNS boolean | |
| LANGUAGE sql | |
| AS $$ | |
| SELECT EXISTS ( | |
| SELECT 1 | |
| FROM pg_type t | |
| JOIN pg_namespace n ON t.typnamespace = n.oid | |
| WHERE t.typname = enum_name |
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
| import typer | |
| app = typer.Typer(context_settings={"help_options_names": ["-h","--help"]}) | |
| # ... | |
| if __name__ == "__main__": | |
| app() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I recently upgrade my mac to 12.6, and xcode command line tools is now in an install loop. Preventing me from running make commands, I found this stack overflow post.
TL;DR: my need to reset path to xcode tools (I think)
xcode-select -s /Library/Developer/CommandLineToolsNewerOlder