March 4, 2024

gpg-agent as ssh-agent

Any reasonably recent systemd based desktop distro will have a gpg-agent that is launched in supervised mode on login. Supervised means that it will be killed on logout. This implies that passphrases will have to entered again after logout. The setup below works on Chrom{e,ium}OS too. pinentry The terminal where you set export GPG_TTY=$(tty); echo updatestartuptty | gpg-connect-agent is where pinentry will ask for the passphrase. If you happen to be running some curses thing when pinentry decides to use the pts, not only will pinentry not be able to read your passphrase, it will leave your pts in a state where you can’t even call tput reset to fix it. Read more

March 21, 2020

Kannada in the Terminal

Its 2020 and I am consumed by needing to have Kannada in the terminal. The reason is that I have to deal with a bunch of AWS profiles and regions and I need to have context as my commands work the same way in dev as they do in prod. So I whip up a quick prompt_segment. The important bit is: region_map=('cci' 'ಕೊಂ' 'tyk' 'ಟೈ') local prompt_text="%{%B${AWS_CHAR}%1G%} %{${region_map[${AWS_PROFILE}]}%1G%}%b·${AWS_DEFAULT_REGION/-*-/}" Stripping away the %{%} glitch syntax, it is is essentially ${region_map[${AWS_PROFILE}]. Read more

September 17, 2019

Terminals in 2019

Modern terminals Most recent terminal emulators have removal of cruft as a goal. Having used the oldest of the modern terminal emulators, rxvt-unicode for almost 10 years, the pain points were: implementing functions based on selections (send to pastebin, google) is idiosyncratic the font handling niggles (antialias support, configuration) configuration across Xdefaults, i3, alternatives The last point is unavoidable but to address the first two, I decided to use st combined with mtm for multiplexing. Read more

September 8, 2019

Blue LED on the Odroid-C2

I use Librelec on my Odroid-C2 to play 4k content. It supports DCI 4k at 60fps and it is slightly more expensive than a RPi4. The blue LED functions as a sort of hearbeat. It is somehow linked to kernel activity in way that I’m not entirely sure. If it blinks like crazy all is well. However, the blue LED is quite bright and quite annoying to dark adapted eyes. It doesn’t help that I don’t have a case for my newest Odroid-C2 (last one abandoned with the rest of my old life in Thailand). Read more

September 8, 2019

Brother DCP L2520D on armhf

Brother DCP L2520D on armhf Pros auto duplex printer+scanner=copier driver support for linux Cheap ($175) Laser printer Cons No network (see below for why this might not be a con) No colour No fax Confguration Brother provide a driver install tool that that was released in 2018 but still lives in the glory days of sys-v and initscripts. The script makes for a fun read on a rainy afternoon. Chinese users can also enjoy the script. Read more

November 17, 2018

Building a Digital Homestead: Chapter 2

The computer was born to solve problems that did not exist before. — Bill Gates Booting the HC2 Building a rootfs Buildroot at the time of writing did not have support for the Odroid HC2/XU4. It did have support for the Odroid C2. It turns out that some kind folks have added support for the XU4. I check out this branch and start building. $ make odroidxu4_defconfig $ make nconfig The first command sets up a . Read more

November 10, 2018

Building a Digital Homestead: Chapter 1

At first I hoped that such a technically unsound project would collapse but I soon realized it was doomed to success. Almost anything in software can be implemented, sold, and even used given enough determination. There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars. But there is one quality that cannot be purchased in this way — and that is reliability. Read more

November 8, 2018

Building a Digital Homestead: Chapter 0

Well begun is half done. – Unknown, perhaps Aristotle We live in interesting times. The internet has settled into a natural oligopoly over the past decade or so. Governments have grasped the surveillance possibilities of the networked world. On the other hand, SBCs have lowered the barrier of entry for a reliable personal “cloud”. The first task is to setup a scalable storage solution. Commercial NAS offerrings are usually quite expensive. Read more

October 30, 2018

Resurrecting an old x61s

My old x61s was bought in 2005 and wrote all the code for wevouch.com a venture into peer-to-peer lending. It saw a lot of use but being one of the old-school TPs, it has some life left in it. Hardware Parts replaced: The failed 7200rpm SATA-I HDD with a cheap SSD A replacement keyboard New batteries An AC adapter All of the above was ordered on aliexpress.com and the combined expense was ~$100. Read more

August 1, 2018

Using Scrapy to parse FARA

Quickstart Run the spider as: $ :> fprincipals.jl :> s.log; scrapy crawl active_foreign_principals -o fprincipals.jl --logfile=s.log This will truncate the output and the log file. JSON-lines output format is always appended to. Setup Install scrapy for Python3. $ virtualenv -p python3 py3 $ source py3/bin/activate $ pip install Scrapy ipython Now, create a crawler project $ mkdir ~/src/fara $ cd ~/src/fara $ scrapy startproject fara $ cd fara $ scrapy genspider active_foreign_principals efile. Read more

Powered by Hugo & Kiss.