I hereby claim:
- I am patillacode on github.
- I am patillacode (https://keybase.io/patillacode) on keybase.
- I have a public key ASDc90pWfK4Dq76XRSxknUQ_E1Cgws8TMj8B8mXkvApBiAo
To claim this, I am signing this object:
| import wagtail.fields | |
| def deconstruct_without_block_definition(self): | |
| name, path, _, kwargs = super(wagtail.fields.StreamField, self).deconstruct() | |
| block_types = list() | |
| args = [block_types] | |
| return name, path, args, kwargs | |
| #!/bin/bash | |
| # credit to: jogerj (https://gist.github.com/dideler/85de4d64f66c1966788c1b2304b9caf1?permalink_comment_id=4327762#gistcomment-4327762) | |
| TELEGRAM_BOT_TOKEN="botid:token" | |
| CHAT_ID="1234567890" | |
| send_telegram () { | |
| title="$1" | |
| timestamp="$(date -R)" | |
| msg="$title\n$timestamp\n\n$(echo "$2" | sed -z -e 's|\\|\\\\|g' -e 's|\n|\\n|g' -e 's|\t|\\t|g' -e 's|\"|\\"|g')" |
| # generate asciinema (ctrl-D) to exit when done | |
| asciinema rec -t my-demo | |
| # convert asciinema into svg via svg-term (https://github.com/marionebl/svg-term-cli) | |
| svg-term --cast=598561 --out examples/demo.svg --window | |
| # add svg to your markdown file aka README | |
|  |
| #!/bin/bash | |
| ################################################################################ | |
| # cap - capture your screen | |
| # | |
| # This script allows you to capture your screen on Linux or macOS systems using | |
| # the appropriate tools available on each platform. On Linux, it uses 'slop' | |
| # and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts | |
| # you to select a desktop area for recording and saves the recording as an MP4/MOV | |
| # file with customizable video quality. |
| sudo cp /etc/nginx/sites-available/existing-config /etc/nginx/sites-available/new-config | |
| sudo vi /etc/nginx/sites-available/new-config | |
| sudo ln -s /etc/nginx/sites-available/new-config /etc/nginx/sites-enabled/ | |
| sudo /usr/sbin/nginx -s reload |
| # Switch to the master branch and make sure you are up to date. | |
| git checkout master | |
| git fetch # this may be necessary (depending on your git config) to receive updates on origin/master | |
| git pull | |
| # Merge the feature branch into the master branch. | |
| git merge feature_branch | |
| # Reset the master branch to origin's state. |
| #!/bin/bash | |
| tput setaf 1 && tput bold | |
| echo "Stopping the Plex server" | |
| sudo service plexmediaserver stop | |
| tput sgr0 && tput setaf 4 | |
| echo "Moving to /tmp/ ..." | |
| cd /tmp/ |
I hereby claim:
To claim this, I am signing this object:
| def print_status_bar(number, number_of_pages): | |
| percentage = int((number / number_of_pages) * 100) | |
| progress = int((percentage * 20) / 100) | |
| progress_msg = '#' * progress + '.' * (20 - progress) | |
| msg = f' Processing [{progress_msg}] ({number}/{number_of_pages})' | |
| print(msg, end='\r', flush=True) | |
| # Use | |
| number_of_pages = Page.objects.count() | |
| for number, page in enumerate(Page.objects.all()): |