Posts tagged: cli

All posts with the tag "cli"

25 posts latest post 2025-06-17
Publishing rhythm
Jun 2025 | 1 posts

ffmpeg -i input.mp4 -map 0 -c:v libx264 -vf format=yuv420p -c:a copy output.mp4

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

Playing around with Modal Labs One of the first things I tried was a regular cron job… This can get deployed with This function gets deployed as an app that I conveniently call (as far as I can tell the app name can be anything - as I add functions to this same app and deploy with the same name to get a new version) Notice that this also is an example of giving access to a secret - defined in the Modal Labs dashboard We can take a look at the apps running at https://modal.com/apps I then added another function to experiment with custom container images and saw then that Modal will just slap a new version on anything provisioned with the same name (intuitive enough for sure) so when I add functions to my.py script and run over and over, the app called in the Modal apps dashboard just gets a new version This means I can spin up several instances of functionally the same app but with different names/versions etc… Q: Maybe there’s gitops or policy stuff builtin to app names then? I needed…

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