run ansible playbook

Here’s the command to run the Ansible playbook. ansible-playbook -t hosts playbook.yml Or simply run it like this. ansible-playbook playbook.yml

June 16, 2020 · 1 min · ulysses

powershell test network connection

Here’s the command to test a network connection in Powershell. C:> Test-NetConnection -ComputerName server -Port 443 Result: ComputerName : server RemoteAddress : 10.0.0.5 RemotePort : 443 InterfaceAlias : Ethernet 0 SourceAddress : 10.1.1.34 TcpTestSucceeded : True

June 15, 2020 · 1 min · ulysses

ffmpeg fix audio sync

If you have a video with audio sync issues, you can easily fix it using ffmpeg. It takes 2 inputs: the filename and delay: 0.100 is 100 ms or 0.1 seconds. Output file has -fixed appended to it. It’s fast. Only takes 2-3 seconds to process a 1.5 hour recording. Here’s the script. ffmpeg -i livestream.mp4 \ -itsoffset 0.100 \ -i livestream.mp4 \ -map 0:0 -map 1:1 \ -acodec copy \ -vcodec copy \ livestream-fixed.mp4

June 14, 2020 · 1 min · ulysses

mysql restore to another db

In order to restore a MySQL database to another database, use routines and triggers. mysqldump -p user -p --routines --triggers db1 > db1.sql To restore to another database, just use the normal command. mysql -u user -p db2

June 14, 2020 · 1 min · ulysses

gcp uefi compatible

When trying to boot from a disk created from snapshot and you’re getting an “UEFI feature is not available for this project” error, you’ll need to create a boot image with the –guest-os-features option set to “UEFI_COMPATIBLE.” gcloud compute disks create new-server-disk-2 \ --project=project-name \ --source-snapshot=server-disk-2 \ --zone=us-central1-b \ --guest-os-features="UEFI_COMPATIBLE" It’s about enabling guest operating system features on custom images. The guest operating system features let you configure networking, security, storage, and operating system options on custom images to be used on boot disks.

June 8, 2020 · 1 min · ulysses

ubuntu packages kept back

If you see packages are being kept back in Ubuntu, you can run the following to force an update. sudo apt-get --with-new-pkgs upgrade

June 4, 2020 · 1 min · ulysses

aws certificate list

Here’s how to get a list of certificates in AWS Certificate Manager. aws acm list-certificates \ --profile default \ --region us-east-1 \ --output text \ --query 'CertificateSummaryList[*].{ARN:CertificateArn,Domain:DomainName}'

June 3, 2020 · 1 min · ulysses

7zip in linux

To install 7zip. yum install 7za apt install p7zip To extract. 7za e compressedfile.7z To archive. 7za a myarchive.7z myfiles/

June 2, 2020 · 1 min · ulysses

gcp display forwarding rules

Here’s how to display a list of Google Cloud forwarding rules. gcloud compute forwarding-rules list If you want global only. gcloud compute forwarding-rules --global Or just local regions only. gcloud compute forwarding-rules --filter="region:( us-central us-west1 )"

June 1, 2020 · 1 min · ulysses

ffmpeg convert mp3 to ogg

How to convert MP3 to OGG audio format. ffmpeg -i in.mp3 -ar 48000 -vn -c:a libvorbis out.ogg If you have sample rate errors, use -vn.

May 31, 2020 · 1 min · ulysses