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
| use jobd.nu | |
| # Start background jobs | |
| jobd spawn "background-job1" { bash -c 'while [ true ]; do echo "background running"; sleep 5; done' } | |
| jobd spawn "background-job2" --restart { bash -c 'sleep 5' } | |
| # Start main job we want to wait for | |
| jobd spawn "main-job" { bash -c 'sleep 20' } | |
| # Wait for main job to be done, end all other jobs when this happens | |
| jobd wait "main-job" --end |
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
| # This nu modules adds "git cc" to create commits following the conventional commit schema, see | |
| # https://www.conventionalcommits.org/en/v1.0.0/ | |
| # | |
| # Example usage: | |
| # git cc -t feat -s my-feature -i my-issue -m "My feature" | |
| # git cc fix -s my-fix -m "My fix" | |
| # | |
| # Is uses a slightly extended version of conventional commits to also include a commit type | |
| # emoji and a commit issue. The commit scope will be inferred from the current git status, | |
| # using changes folder names by default (using the "git cc-get-scope" command also provided |
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 typing import Callable, Type | |
| import functools | |
| class class_or_instance_method: | |
| func: Callable | |
| def __init__(self, func: Callable): | |
| self.func = func |
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
| These two files provide limited syntax highlighting using the most | |
| excellent codemirror syntax highlighter. | |
| See: | |
| http://marijn.haverbeke.nl/codemirror/ | |
| Stick the .js and .css files in the appropriate spots for your | |
| codemirror installation. | |
| You can enable it on a textarea using something like: |