docker images -q ubuntu:latest
pega id das últimas imagens antes da latest (não inclui a última antes da latest, para fins de backup)
docker images -q --filter "before=ubuntu:latest" --format "{{.ID}}" | awk 'NR>1'
# Video: https://youtu.be/b-KFj8GfvzE | |
# Full Backup | |
mariadb-backup --backup \ | |
--user=$DB_ROOT_USER \ | |
--password=$DB_ROOT_PASSWORD \ | |
--target-dir=$BACKUP_BASE_DIR | |
# Incremental Backup | |
mariadb-backup --backup \ | |
--user=$DB_ROOT_USER \ |
alias ps='docker compose ps --format "table {{.Name}}\t{{.Image}}\t{{.Ports}}\t{{.State}}\t{{.Status}}"' |
services: | |
zlmediakit: | |
image: zlmediakit/zlmediakit:master | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- capabilities: [gpu] | |
environment: | |
- NVIDIA_VISIBLE_DEVICES=all |
zip -r -s 5G file.zip path/to/folder | |
cat file.z* > merged.zip |
<?php | |
$b = 'González'; | |
function Unaccent($string) | |
{ | |
return preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')); | |
} | |
Unaccent($b); |
version: '3.6' | |
services: | |
kiloview: | |
image: kiloview/klnkserver:latest | |
restart: always | |
ports: | |
- '82:82' | |
- '60000:60000/udp' | |
- '60001:60001/udp' |
find . -maxdepth 1 -type d -mtime +20 -exec rm -rf {} \; |
<?php | |
use Illuminate\Support\Facades\Crypt; | |
trait Encryptable | |
{ | |
/** | |
* Decrypt the column value if it is in the encrypted array. | |
* | |
* @param $key |
# Terminator | |
## https://github.com/gnome-terminator/terminator | |
# unbind default terminal command | |
# gsettings set org.gnome.settings-daemon.plugins.media-keys terminal '[]' | |
# Go to Settings -> Devices -> Keyboard and scroll to the end. Press + and you will create custom shortcut. | |
# Enter name: "terminator", command: /usr/bin/terminator -l "layout-custom" | |
sudo add-apt-repository ppa:mattrose/terminator |