Make SSH Ignore Key, When Logging On to a Fresh Box

Every now and then, I spin up a fresh vm. And being a creature of habit, I use the same username on my play / experimental vms as my normal login. So everytime I try to login to such a vm or pi, I get a Too many authentication failures error. So to just get in and start working, I need to tell ssh to ignore my keys and try using passwords as the authentication mechanism. Like so ...

October 18, 2022 · Mario Jason Braganza

Notes to Self, on Self Hosting Fonts on My Hugo Blog

Writing this down, so that I will not struggle the next time1, I have to do this. I use Valkyrie for everything on the blog in various weights, except for code and preformatted stuff, which uses Source Code Pro Medium. Both are WOFF2 fonts. Anything in Hugo’s assets/css/extended folder will be picked up by Hugo and bundled into a single CSS file. The fonts are in subdirectories in the static/fonts/font-name folder. Anything in the static folder shows up at the root of the site. ~/mjb/blog/static/images/test.jpg will become /images/test.jpg I’ve created an embed-font-name.css file in the css folder above, with embed instructions generously provided by Matthew Butterick in his font documentation for Valkyrie. I adapted the same for Source Code Pro as well. Here’s a sample of my embed-source-code-pro.css 1 2 3 4 5 6 7 8 @font-face { font-family: 'Source Code Pro Medium'; font-style: normal; font-weight: medium; font-stretch: normal; font-display: auto; src: url('/fonts/source-code-pro/SourceCodePro-Medium.woff2') format('woff2'); } Finally, I created a zz-include-css.css file, which I use to overide the default CSS, so I can use my custom fonts. Since it starts with a zz it comes after the files above, that start with embed, in the final munged and minified CSS file. These are my instructions to have most text rendered with Valkyrie and code as Source Code Pro Medium2 1 2 3 4 5 6 7 8 9 10 #top { font-family: valkyrie; font-variant: oldstyle-nums; } .post-content pre, code { font-family: 'Source Code Pro Medium'; font-style: medium; font-weight: 500; } Look! So pretty :) P.S. Subscribe to my mailing list! Forward these posts and letters to your friends and get them to subscribe! P.P.S. Feed my insatiable reading habit. ...

October 9, 2022 · Mario Jason Braganza

Exclude Files and Folders From an Rsync Copy

I’ve been sticking to plain old rsync -az to sling files around using Rsync. Until I ran into a hiccough today, where I filled up my teensy remote storage on the Pi, because a couple of subdirectories that were part of the run, were hundreds of megabytes large.1 So I did the usual, did hunt around the web thing, and learnt about --exclude So now the new Rsync command is … rsync -az src dest --exclude={'excluded_dir_1','excluded_dir_2'} ...

September 18, 2022 · Mario Jason Braganza

Rename a File as You Work on It in Emacs

I often fat fingered the file name / buffer name / Org Roam link name when launching something new. And then when I am busy and knee deep in work, I glance up to see the error glaring at me. I figured out, looked up how to fix it Hit C-x d to flip into a dired buffer Find my filename in the list. (C-s can help search and narrow stuff) Then C-x C-q to go into Wdired mode Change the file name to whatever I want it to C-c C-c to be done with it. Et voilà! (If you are editing an Org Roam node, M-x org-roam-db-sync to keep everything shipshape)1 ...

September 16, 2022 · Mario Jason Braganza

Moving Tasks Between Org Files in Emacs

More diving into Org Mode and Emacs. I have a stuff-to-do.org file, that serves as an inbox for most long term tasks that I want to tackle. Stuff that needs doing, books that I want to buy, books that I want to read, courses that I want to learn, movies or tv shows that I want to watch, stuff on the web that I want to catchup on, etc. etc. etc. ...

August 23, 2022 · Mario Jason Braganza

Notes to Self on Renewing Wildcard Certbot Certs

(Update, 2024-03-15: I now use lego. will update this post later.) After struggling to renew my certs for the third time in a row, hopefully these pointers should keep me on track for the next time. Namecheap does not yet support automatic wildcard renewal for the Letsencrypt/Certbot combo. Check next year. Have your Namecheap control panel open and ready. Switch to root or run the command below with sudo Command to renew: certbot certonly --manual --manual-public-ip-logging-ok --preferred-challenges dns-01 -d *.domain.com -d domain.com certbot will then, print a couple of lines that you need to add as a TXT record in the Namecheap DNS control panel. When you do that, make sure you set the TTL of the record, to a minute, so that you can redo stuff quicker, if you mess up. certbot might ask you to do multiple records. Read the instructions carefully. When you check to see if the TXT record is set, search for the whole domain name. For e.g. _acme-challenge.domain.blah instead of just domain.blah If you’ve done all of the above, hopefully things should go smoothly and the certificate should renew. Restart Nginx and you’re done. If you have multiple machines, figure out a way to securely transfer the certs there too. P.S. Subscribe to my mailing list! Forward these posts and letters to your friends and get them to subscribe! P.P.S. Feed my insatiable reading habit.

August 20, 2022 · Mario Jason Braganza