// In edge cases, it would be useful to iterate through a string literal,
// so you can do something based on each value.
// Let's say you have a literal of UserRoles| name: changelog-check | |
| on: | |
| - pull_request | |
| jobs: | |
| changelog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get base depth | |
| id: base-depth | |
| run: echo "base-depth=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_OUTPUT | 
I'm surely not maintaining this as well as I could. There are also other possible, better integrated solutions, like django-vite, so keep in mind this was supposed to be more of a note to myself than anything :]
This gist has most of the things I've used to develop the frontend using vite inside a monolithic django app.
Here's a boilerplate that uses this approach: https://github.com/labcodes/django-react-boilerplate
A couple of things to note:
| from browser import html | |
| from breact import render_to_DOM, Component | |
| from Counter import Counter | |
| class App(Component): | |
| def render(self): | |
| return html.DIV([ | |
| html.H1('Counter'), | |
| Counter()() | 
This script makes it easier to copy Gnome settings and extensions from one pc to the other. It supports python>=3.5.
To use it, download it, then run python3 migrate_gnome_settings.py --export-settings to create a tar.gz file with all the settings.
Then, on your new system, copy the script and the gzip to your user's home directory and run python3 migrate_gnome_settings.py --import-settings.
For now, the script migrates:
Instructions:
- download dependencies:
- https://github.com/sharkdp/fd/releases
- sudo apt install silversearcher-ag xclip
- node > 8.10.0
 
- install FiraCode Nerd Font Retina: https://github.com/ryanoasis/nerd-fonts#patched-fonts
- install neovim: https://github.com/neovim/neovim/wiki/Installing-Neovim#install-from-package
| {"lastUpload":"2020-12-09T02:29:49.135Z","extensionVersion":"v3.4.3"} | 
| [Desktop Entry] | |
| Version=1.0 | |
| Name=Patched - Firefox Web Browser | |
| Name[ar]=Patched - متصفح الويب فَيَرفُكْس | |
| Name[ast]=Patched - Restolador web Firefox | |
| Name[bn]=Patched - ফায়ারফক্স ওয়েব ব্রাউজার | |
| Name[ca]=Patched - Navegador web Firefox | |
| Name[cs]=Patched - Firefox Webový prohlížeč | |
| Name[da]=Patched - Firefox - internetbrowser | |
| Name[el]=Patched - Περιηγητής Firefox | 
| "*": | |
| "autoclose-html": | |
| legacyMode: true | |
| "autoupdate-packages": | |
| lastUpdateTimestamp: 1518799191736 | |
| "config-import-export": | |
| defaultPath: | |
| darwin: "" | |
| freebsd: "" | |
| linux: "~/AtomBackups" |