Blocks in Org Mode

I remember, when I first learned it, the Org Manual mentioning I could have code, quotes, poetry and sundry self structured blocks of text, where the text in that block would flow like I wanted it to. I could have indentation or line breaks as I pleased. And then I promptly forgot about it. The only thing I did remember were code blocks. And that I needed to do a #+begin_src and then a #+end_src and put my code in the middle. And all this while, I would keep typing it in, by hand. ...

September 27, 2022 · Mario Jason Braganza

Links to Writing of Interest

Been meaning to write up a short note to some of my writing to point folks to. So here goes. This serves as a mélange of the things I write and interest me. I’ve coauthored a book on linux, Linux for You and Me Related HN discussion My blog at Janusworx Learning about Cross Site Request Forgery (CSRF) Protection in Django Models in Django (and heuristics for creating optimal models) Python Advanced Objects Iterators and Generators in Python Python Comprehensions Miniflux Fails to Start at Boot I have written long form articles, to serve as teaching material for Linux Users’ Group of Durgapur Blogging IRC on the Web 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. ...

September 25, 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

Line Numbers in Hugo Codeblocks

I want my code blocks on the blog to sometimes have line numbers. Looking at the Hugo docs here and here led me to the linenos argument. While we’d start our code blocks like (```python)1, all I need more is to add the line number argument like so. Vanilla code block … print(f""" “It’s silly to try to escape other people’s faults. They are inescapable. Just try to escape your own.” — Marcus Aurelius """) print(f""" “Just that you do the right thing. The rest doesn’t matter.” – Marcus Aurelius """) Now, using the linenos option, I can be all fancy to show … ...

September 17, 2022 · Mario Jason Braganza

Thank God for Noah

This James Somers post, made me realise why my dictionary word lookups were so much less engaging than when I was a kid. From the post … […] go look up “flash” in Webster’s (the edition I’m using is the 1913). The first thing you’ll notice is that the example sentences don’t sound like they came out of a DMV training manual (“the lights started flashing”) — they come from Milton and Shakespeare and Tennyson (“A thought flashed through me, which I clothed in act”) ...

September 16, 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