ffmpeg -i input.mp4 -map 0 -c:v libx264 -vf format=yuv420p -c:a copy output.mp4
Posts tagged: cli
All posts with the tag "cli"
I was getting (publickey denied) when trying to push to GH using ssh. When I
tested the connection I saw that a bunch of keys in ``~/.ssh/ were being
attempted
✗ ssh git@github.com -vv
...
debug1: Will attempt key: /home/nic/.ssh/id_rsa
debug1: Will attempt key: /home/nic/.ssh/id_ecdsa
debug1: Will attempt key: /home/nic/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/nic/.ssh/id_ed25519
debug1: Will attempt key: /home/nic/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/nic/.ssh/id_xmss
debug1: Will attempt key: /home/nic/.ssh/id_dsa
...
debug1: No more authentication methods to try.
git@github.com: Permission denied (publickey).
None of those were the key I setup with GH. So I added an entry
into ~/.ssh/config:
Host
github.com
User git
Port 22
Hostname github.com
IdentityFile ~/.ssh/my_custom_github_key
TCPKeepAlive yes
IdentitiesOnly yes
Modal Labs
I’m playing with my ansible playbook in a remote tmux session, and I’m no wiz
so I don’t know the ins and outs, but I can’t scroll up to get any console log
output that’s not already visible on my screen. So I’m starting to end my
commands with | less so I can page through the console output!
ansible-playbook plays.yml -v --tags mytag | less
Logging instead of printing
I am trying to adopt logger.debug instead of print but ran into a confusing
thing in ipython during Advent of Code… I riddled by script with
logger.debug (yes after setting logging.setLevel('DEBUG')) but in ipython
none of my log messages showed up!
import logging
logger = logging.getLogger(__name__)
logger.setLevel("DEBUG")
Turns out what I was missing was a call to basicConfig
import logging
# forget this and your messages are in the ether! or at least not seen in ipython...
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel("DEBUG")
Bonus
Want your new messages to show up while iterating on something without killing the ipython kernel?
from importlib import reload
reload(logging) # to make sure you get new log messages you add while developing!
mkdir s{1..10} will make directories s1, s2, … s10 in one command!
zfs list has a flag -r, but if you use zfs driver for docker then you’ll get flooded with every docker volume in the world. zfs list -r -d N will limit the dept of the print out, so zfs list -r -d 2 gives me tank, tank/encrypted, tank/encrypted/docker -> but then I don’t see all the continer volumes
If you think glepnir/lspsaga.nvim config will work with tali5/lspsaga.nvim installed… you’re in for a rude awakening. Double check your forks folks!
ssh -v -i ~/.ssh/id_rsa nic@hogwarts
THen we can look at print outs
cat /var/log/auth.log also showed me that I had too wide permissions on files in ~/.ssh -> probably changed from an rsync job
sudo dmidecode -s bios-version