-i - ignore errors
-c - continue
-t - use video title as file name
--extract-audio - extract audio track
| import logging.config | |
| import os | |
| from django.utils.log import DEFAULT_LOGGING | |
| # Disable Django's logging setup | |
| LOGGING_CONFIG = None | |
| LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper() | |
| logging.config.dictConfig({ |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| #!/bin/bash | |
| echo "WARN: This will remove everything from docker: volumes, containers and images. Will you dare? [y/N] " | |
| read choice | |
| if [ \( "$choice" == "y" \) -o \( "$choice" == "Y" \) ] | |
| then | |
| sudo echo "> sudo rights [OK]" | |
| sizea=`sudo du -sh /var/lib/docker/aufs` |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
| # Prints username@hostname working-directory> | |
| function prompt_party { | |
| PS1="\[\033[38;5;$(jot -r 1 1 256)m\]\u\[\033[00m\]" | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]@\[\033[00m\]" | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\h\[\033[00m\] " | |
| PS1="$PS1\[\033[38;5;$(jot -r 1 1 256)m\]\w\[\033[00m\]> " | |
| } | |
| PROMPT_COMMAND=prompt_party |