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
| # Wrapper function to launch Claude and either create a new session for the branch | |
| # or resume a past session based on the branch name | |
| function c() { | |
| local name=$(git branch --show-current) | |
| if [[ "$name" == "main" ]]; then | |
| claude | |
| return | |
| fi |
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
| class ExampleDatabaseRouter(object): | |
| """ | |
| Determine how to route database calls for an app's models (in this case, for an app named Example). | |
| All other models will be routed to the next router in the DATABASE_ROUTERS setting if applicable, | |
| or otherwise to the default database. | |
| """ | |
| def db_for_read(self, model, **hints): | |
| """Send all read operations on Example app models to `example_db`.""" | |
| if model._meta.app_label == 'example': |
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
| ### | |
| # Parse video ID from URL | |
| # Works for YouTube and Vimeo URLs, see test URLs below | |
| # | |
| # Returns a list including the parsed ID and the content provider (youtube or vimeo) | |
| # e.g. ['id12345', 'youtube'] | |
| # If no match is found, function assumes parameter is a YouTube ID | |
| # | |
| # @author: rcscott | |
| # |