Skip to content

Instantly share code, notes, and snippets.

View mrbrazzi's full-sized avatar

Mr. Brazzi mrbrazzi

View GitHub Profile
@hasantayyar
hasantayyar / .htaccess
Last active April 19, 2020 19:20
Maintenance page redirection with htaccess
# check if there is a file named maintenance.html
# so when you want to disable maintenance mode just remname "mv maintenance.html maintenance.html.disabled"
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /maintenance.html [R=503,L]
ErrorDocument 503 /maintenance.html
@brock
brock / psql-with-gzip-cheatsheet.sh
Last active May 14, 2025 13:12
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@vielhuber
vielhuber / script.sh
Last active August 19, 2025 11:26
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@patricknelson
patricknelson / - Using Xdebug in Docker.md
Last active October 15, 2023 19:59
Using Xdebug in Docker (works with PhpStorm)

Using Xdebug in Docker

Getting setup and running with Xdebug in a docker container these days is now fairly simple and is composed of two main steps:

  1. Ensure you've got XDebug installed and enabled in your PHP docker image, for example:
    # Installing Xdebug with PHP 7.3 images:
    RUN pecl install xdebug \
      && docker-php-ext-enable xdebug
@devinschumacher
devinschumacher / how-to-loom.md
Last active November 5, 2025 22:24
How To Download Loom Videos For Free! 🚀 DL Without Subscription | ~10 Examples (.mp4, HLS, .m3u8)

How to Download Loom Videos: A Complete Step-by-Step Guide (With Real Examples & Command Cheatsheet)

Loom is a great tool for recording and sharing videos, but the platform has restrictions when it comes to downloading — especially if you’re not on a paid plan anymore.

You might have dozens or even hundreds of old recordings and realize you don’t have a way to save them locally (i did)

That’s frustrating, but it’s fixable. In this article, I’ll walk you through the exact process of detecting, inspecting, and downloading Loom videos using yt-dlp.

We’ll cover several different real-world scenarios you’ll encounter — from normal share links, to embeds, to videos with separate audio and video streams.