NAME=someapp_api; CMD=bash; docker exec -it `docker ps -f name="${NAME}" --format '{{.ID}}' | head -n 1` ${CMD}
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
gci .\src\ -Recurse -Filter *.js | Rename-Item -NewName {$_.name -replace '.js', '.jsx'} |
apt install -y pwgen
pwgen -B1ys 30 20 | grep -v [\'\"\`] | head -n 1
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
Postgresql on Debian |
Docker Caddy Wordpress
Following commands disables Microsoft AutoUpdate launch agent from launching at boot and periodicaly checking for updates.
sudo defaults write /Library/LaunchAgents/com.microsoft.update.agent.plist Disabled -bool YES
sudo defaults write /Library/LaunchAgents/com.microsoft.update.agent.plist RunAtLoad -bool NO
sudo chflags schg /Library/LaunchAgents/com.microsoft.update.agent.plist
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
# $ lsb_release -a | |
# No LSB modules are available. | |
# Distributor ID: Ubuntu | |
# Description: Ubuntu 16.04.5 LTS | |
# Release: 16.04 | |
# Codename: xenial | |
# $ uname -a | |
# Linux xps 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
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
#!/usr/bin/env bash | |
DBNAME=$1 | |
DIR=$2 | |
DUMP=/usr/bin/mysqldump | |
PREFIX="${DBNAME}"; | |
SUFFIX=$(date +"%F-%H%M%S"); | |
FILENAME="${PREFIX}-${SUFFIX}.sql"; |
NewerOlder