This file contains 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
#!/bin/bash | |
timestamp=$(date +%Y-%m-%d_%H-%M-%S) | |
vimrc_backup=/tmp/.vimrc.bak.$timestamp | |
# backup previous vimrc | |
if [ -f ~/.vimrc ]; then | |
cp -R ~/.vimrc $vimrc_backup | |
echo "Previous .vimrc was backed up to $vimrc_backup" | |
fi |
This file contains 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
call plug#begin() | |
" List your plugins here | |
Plug 'ghomem/nerdtree' | |
Plug 'ghifarit53/tokyonight-vim' | |
Plug 'itchyny/lightline.vim' | |
Plug 'tpope/vim-fugitive' | |
Plug 'rodjek/vim-puppet' | |
Plug 'iberianpig/tig-explorer.vim' | |
Plug 'mhinz/vim-grepper' |
This file contains 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
requester = requests.session() | |
retries = Retry(total=nr_retries, backoff_factor=backoff_factor, | |
status_forcelist=FORCE_RETRY_STATUS_CODE_LIST) | |
requester.mount("https://", HTTPAdapter(max_retries=retries)) | |
requester.mount("http://", HTTPAdapter(max_retries=retries)) | |
try: | |
response = requester.get(url=url, timeout=client_timeout) |
This file contains 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 form includes the HTMX hx-post and hx-target elements --> | |
<form hx-post="/render" hx-target="#the-image" autocomplete="off"> | |
<! ... div with code for the input fields here --> | |
<!-- Buttons --> | |
<div class="grid"> | |
<input type="submit" value="Generate" /> | |
<! ... code for the other buttons here --> | |
</div> |
This file contains 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
<div id="the-image" hx-swap-oob="true"> | |
<figure> | |
<img src="/static/img/initial-image.jpg" alt="Default image" style="border:1px solid {{img_border_color}}; margin-top: {{img_top_margin}}px"/> | |
</figure> | |
</div> |