RSSAmplifier

Blog

Sai Charan

Recent content on Sai Charan

saicharan.inRSS feed ↗158 posts

Latest posts

GB Shaw - The Unresonable Man

The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man. – George Bernard Shaw — As heard on David Senra’s podcast .

Gitea with a dash Of Claude

A note to self on my Gitea setup. Basic Setup I chose to set up manually, using the release binary, following the basic setup instructions from here Gitea docs . On Ubuntu/Debian $ adduser \ --system \ --shell /bin/bash \ --gecos 'Gitea Version Control' \ --group \ --disabled-password \ --home /home/gitea \ gitea $ mkdir -p /var/lib/gitea/{custom,data,log} $ chown -R gitea:gitea /var/lib/gitea/ $…

Just Figure Out What's Next

I think if you do something and it turns out pretty good, then you should go do something else wonderful, not dwell on it for too long. Just figure out what’s next. — Steve Jobs

Sometimes, it's Better Physics

When software problems get too hard, sometimes the answer is ‘better physics’. — Urs Hölzle, on LinkedIn .

Commencement Addresses

We somehow ended up watching a few commencement speeches last night. And, these stuck with me. Federer, Dartmouth 2024 On tennis lessons 1 . Effortless is a myth. It’s only a point. Life is bigger than the court. Seinfeld, Duke 2024 On not losing one’s sense of humor 2 . We’re proud of what we should be embarrassed by, and embarrassed by what we should be proud of. Don’t think of having,…

NFS on WD MyCloud

Note: this note pertains to WD MyCloud running firmware v04.06.00-111 . By default, WD MyCloud running OS 3, firmware v04.06.00-111 does not show an option to share via NFS. However, after years of getting tired of the slow CIFS / SMB shares, I was curious if the device actually supported NFS shares, but just did not advertise it on the UI, manuals, and other documentation. Surprise, surprise,…

On Debugging

David A. Wheeler writes : Since the whole book revolves around the nine rules, it might help to understand the book by skimming the rules and their sub-rules: Understand the system Make it fail Quit thinking and look Divide and conquer Change one thing at a time Keep an audit trail Check the plug Get a fresh view If you didn’t fix it, it ain’t fixed ‘Quit thinking and look’…

Experiment Running LLMs Locally

Note: Ollama is really easy to get started with. llama.cpp git clone --depth 1 https://github.com/ggerganov/llama.cpp sudo apt install nvidia-cuda-toolkit sudo apt install gcc-12 g++12 (GCC 13+ isn’t supported) cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_CXX_COMPILER=/usr/bin/g++-12 -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-12 (needed to explicitly set the compilers) cmake --build build…

Changing tty Console's Screen Resolution on Ubuntu

Note: these notes apply to Ubuntu 24.04 LTS. Reboot to get to the GRUB screen. At the GRUB screen, type c to enter the grub > shell. Run videoinfo , and identify the particular screen resolution you would like to use. In this case, say we want to use 2560x1440 Reboot into Linux. Edit /etc/default/grub to add / update the following lines GRUB_CMDLINE_LINUX_DEFAULT='quiet nosplash nomodeset' in my…

Mail-in-a-Box on Oracle Cloud (aarch64)

Notes for installing MiaB for a subdomain (not the root domain) on OCI’s aarch64 Ampere shape VMs: Turn up a VM, note it’s Public IP Pick an Ubuntu LTS version listed at https://mailinabox.email/ The tol only support every other LTS version, see this support thread Set up NS records for Create Glue records (DNS type A for ns1.box.sub.domain.ext and ns2.box.sub.domain.ext pointing at…

Seeing A Short Distance

We can only see a short distance ahead, but we can see plenty there that needs to be done. — Alan Turing, as seen at mlajtos.mu .

The Reasonable Person Principle

Reasonable Person Principle: Everyone will be reasonable. Everyone expects everyone else to be reasonable. No one is special. Do not be offended if someone suggests you are not being reasonable. …And it leaves some room for difference of opinion. — CMU’s School of CS, Support Staff .

John Williams on Music

I was filled with the love of music, and the pleasure if doing it with great musicians. Music for musicians is like breathing. It supports us, sustains us, gives us energy. Music is enough for a lifetime, but a lifetime is not enough for music. — John Williams, in Music by John Williams

The Gervais Principle

The Office is not a random series of cynical gags aimed at momentarily alleviating the existential despair of low-level grunts. It is a fully realized theory of management that falsifies 83.8% of the business section of the bookstore. — Venkatesh G. Rao, writing at ribbonfarm.com .

Acting with Intent

There is space, however small, between the thoughts. And in that space, if we are patient, we can decide how to respond rather than being dragged along by every impulse or fear. This is not about control in the traditional sense, but about clarity. To act, not from reflex, but from intent. — Stormrider, at billwear .

Self Hosting Ghost with SQLite3

Note to self on setting up Ghost with SQLite3 in production (Ghost only officially recommends and supports MySQL in production, so figuring this out was a bit of an effort). Environment Setup Install the latest required NodeJS version (see https://ghost.org/docs/faq/node-versions/ ) Install nginx: sudo apt install nginx -y (apt, assuming a Debian-based Linux distribution) Install ghost-cli: sudo…

Sir C.A.R. Hoare on Software Design

There are two ways of constructing a software design; one way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. — Sir Antony Hoare’s, Computer History Museum citation .

DIY Water Leak Sensor with ESP8266 NodeMCU and Homebridge Server

A leak at home got me looking at water level sensors, but Arlo’s recent annoucement EOL’ing camera support pushed me over the edge into DIY IoT devices. Luckily, in a really simple form, a water leak sensor simply uses water to close the circuit; so a closed circuit indicates water (or some other conductor!) was detected between the leads. Note that this set up cannot be used to detect…

Terence Tao on Work

Relying on intelligence alone to pull things off at the last minute may work for a while, but, generally speaking, at the graduate level or higher it doesn’t. — Terence Tao’s career advice .

Automating Let's Encrypt Certs for DD-WRT with acme.sh

Following up on previous notes on setting up Let’s Encrypt for private networks and SSL for DD-WRT routers , here’s notes on automating renewal of Let’s Encrypt certificates using acme.sh . I use Hurricane Electric’s free DNS service for delegating DNS management for the the private subdomains – DNS resolution is handled externally, but certificates are provisioned on…

The Best Test of Truth...

Reading Stratechery’s Tech and Liberty , ‘The Marketplace of Ideas’ section, I see this quote: The theory of our Constitution is “that the best test of truth is the power of the thought to get itself accepted in the competition of the market,” Abrams v. United States, 250 U.S. 616, 630, 40 S.Ct. 17, 63 L.Ed. 1173 (1919) (Holmes, J., dissenting). And, the first thing that jumps at…

Let's Encrypt SSL Certificates for DD-WRT

Note to self on setting up Let’s Encrypt SSL certificates for DD-WRT. Prerequisites: a router with DD-WRT with a USB port (to mount external USB drive via jffs), an external USB drive, and a domain to assign to your router. My notes on the router setup are here . Create or renew the necessary certificate. openssl rsa -in privkey.pem -out key.pem scp *.pem root@router:/jffs/etc/ Router…

Renewing Let's Encrypt SSL Certificates for Private Networks using DNS Challenge

Note to self on setup for auto-renewing Let’s Encrypt SSL certificates from an (almost) private network. The Usual Rant This would’ve been really simple if Google Domains provided an API interface to add/update/remove DNS TXT records – and would be fully workable from a fully private network, I could (or maybe should?) use a DNS provider with an API and be done, but this setup is…

Airprint with CUPS on DD-WRT

Another note to self on enabling Airprint for a legacy network printer with Avahi and CUPS on DD-WRT (HP P3005). Prerequisites: router with DD-WRT and a USB port (to install cupsd via Entware), a network capable printer. My notes on the router setup are here . Mostly a rehash of the tutorials from TomatoUSB 1 and EzUnix 2 , in case those links go dead: opkg install hplip-full opkg install cups…

Managing Your Internet Of

This is yet another note to self on setting up my home network to isolate ‘smart’ and other IoT devices into isolated networks in their own subnets, but having a functional UX for the family. Contents Contents End Goal Choosing a version of DD-WRT Virtual Interface (WLAN) and VLAN Setup mDNS Setup for Media Devices Static Route Firewall Conclusion Acknowledgements End Goal Here’s…

On Good and Evil

Yes, evil often seems to surpass good. But then, in spite of us, and without our permission, there comes at last an end to the bitter frosts. One morning the wind turns, and there is a thaw. And so I must still have hope. — Vincent van Gogh, quoted on Twitter .

OpenVPN Client on ASUS RT-AC68U with DD-WRT Firmware

Note to self on setting up OpenVPN Client on Asus RT-AC68U Router with DD-WRT. The goal of this exercise was to have OpenVPN client installed on a router that allows my family to enable/disable VPN via simple webapp, without dealing with the full settings page of the router management tool. I had an old TM-AC1900 Cellspot router, but that’s basically a hobbled (in software) version of the…

Wireguard VPN Setup

Note to self on setting up Wireguard VPN service. # Enable wireguard PPA (not required on Ubuntu Eoan) sudo add-apt-repository ppa:wireguard/wireguard -y sudo apt-get update -y # Install dependencies and wireguard sudo apt-get install linux-headers-$(uname -r) -y sudo apt-get install wireguard -y IP Forwarding sudo sed -i -e 's/#net.ipv4.ip_forward. /net.ipv4.ip_forward=1/g' /etc/sysctl.conf sudo…

Man's Troubles - Man Himself

‘I gazed around myself, and my soul was wounded by human suffering. I then looked inside myself, and saw that man’s troubles come from man himself.’ — Yegor Zhukov, quoting Alexander Radishchev during his trial .

On being in a hurry

“We’re in such a hurry most of the time we never get much chance to talk,” Pirsig writes. “The result is a kind of endless day-to-day shallowness, a monotony that leaves a person wondering years later where all the time went and sorry that it’s all gone.” — Robert Prisig, Zen and the Art of Motorcycle Maintenance, Excerpt on Smithsonian Mag .

On Poems & Proofs

A NON-MATHEMATICIAN MIGHT ASK if any of these problems have real-world applications, but is that fair? No one asks a poet what a new poem “does.” The poem’s simplicity, elegance, and beauty are sufficient reasons for its existence. Aren’t the same things true for a mathematical proof? — Mark F. Bernstein, quoting mathematician Terence Tao on the PAW .

Computation is a means, not an end.

The lesson, maybe, is simple: If your phone is so much more powerful than the computers that put humanity on the moon, then why are you just staring at Instagram all day? Computation is means, not end. — Alexis C. Madrigal, Your Smart Toaster Can’t Hold a Candle to the Apollo Computer .

Messaging in Smalltalk

The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be. — Alan Kay on Smalltalk Design on squeak-dev list .

On Passing Statistical Tests

To be brief, a CSRNG should be unbreakable by smart attackers with lots of resources. If a CSRNG does not pass statistical tests, then this means that it can be broken by a chimpanzee. But if it passes the tests, this does in no way prove that it is cryptographically strong; it just means that the chimpanzee will be stumped. — Thomas Pornin on NCC Research .

Meaning of Impossible

After two years of working together, I finally knew for sure what I had long suspected: “Stupid” was just an expression Feynman applied to everyone, including himself, as a way to focus attention on an error so it was never made again. I also learned that “impossible,” when used by Feynman, did not necessarily mean “unachievable” or “ridiculous.” Sometimes it meant, “Wow! Here is something amazing…

List Comprehensions in C++

From Bartosz Milewski&rsquo;s What Does Haskell Have to Do with C++? : Haskell style list comprehensions of the form one x = 1 count lst = sum [one x | x <- lst] can be written in modern C++ like so: template<class T> struct one { static const int value = 1; }; template<class&hellip; lst> struct count { static const int value = sum<one<lst>::value&hellip;>::value; }; The author calls out the…

Parallels Between Physics and Distributed Systems Concepts

The ACM Queue article titled Standing on Distributed Shoulders of Giants was a fascinating read. Some excerpts: &ldquo;Two-phase commit is the anti-availability protocol.&rdquo; &ldquo;Computing is like Hubble&rsquo;s universe&hellip;Everything is getting farther away from everything else.&rdquo; &ldquo;Shared memory works great&hellip; as long as you don&rsquo;t share memory.&rdquo; This one took…

Emulating PDP-11 Abstract Machine as the Root Cause of Spectre and Meltdown

The following excerpts from the ACM Queue article caught my attention. &ldquo;The root cause of the Spectre and Meltdown vulnerabilities was that processor architects were trying to build not just fast processors, but fast processors that expose the same abstract machine as a PDP-11. This is essential because it allows C programmers to continue in the belief that their language is close to the…

We are systematically creating races out of things that ought to be a journey

We are systematically creating races out of things that ought to be a journey. — Charles Wheelan, WSJ .

Static Website on Google App Engine

I&rsquo;ve been experimenting with hosting static websites on Google App Engine (GAE) for a while now. One major deterrent to an otherwise straight forward procedure was the fact that GAE did not automatically serve index.html when encountering static folders. Now that I found this workaround on Stack Overflow , the static website is ready for GAE! But there was another hurdle waiting. GAE&rsquo;s…

Levenshtein Distance for Handling Redirects from Blogger

Here&rsquo;s a problem I&rsquo;ve long faced and a neat use of Levenshtein Distance. This website started off as a blog on blogger.com . Over time, it was migrated to a self hosted Wordpress site and now runs off a Jekyll generated , Amazon S3 hosted bucket. However, since the blogger hosted site still got a lot of traffic from search, I did not take it down. I&rsquo;ve always wanted to redirect…

Handling 404 Errors in Javascript

Migrating between hosting and blogging solutions can cause headaches. Now that I&rsquo;ve moved to an Amazon S3 hosted static website , I needed an intelligent way to handle certain features like tags and categories that I had with the blogger.com and Wordpress hosted site, without the need to host a server. JavaScript to the rescue ! I first identified the specific causes of problem using the…

Wonder without Googling

Great advice on so many levels. Happy New Year! Wonder without googling.

When you have tasted flight

When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been and there you will always long to return. — Leonardo da Vinci (seen on Mark Shuttleworth &rsquo;s blog.)

Import Skype contacts into Gmail

Gmail&rsquo;s contact details includes provision to add usernames from other IM networks. Having this in one place is very handy on the Android phone, for instance. Naïvely exporting Skype&rsquo;s address book via Skype > Contacts > Advanced > Backup contacts to file & importing them into Gmail isn&rsquo;t sufficient. This process imports the contact information alright, but not the skype names,…

Installing mosh from source

Installing mosh , the MObileSHell on a linux box with no sudo access can be quite a bit of a pain. And, with many users working with shared, managed linux gateways, I suppose this could be useful to a larger audience. In this note, I will attempt to install mosh into the home directory of user sai with home directory at /home/sai assuming user sai does not have root access on this machine. This…

The silent majority of experts

James Hague, in a piece titled The Silent Majority of Experts , quotes Elizabeth Rather : &hellip;there are people solving real problems with Forth, but they don&rsquo;t hang-out in the newsgroup.

Liquid, Fluid site layout

Inspired by wikipedia , marco.org and other gorgeous websites, I added the necessary CSS for this website to adapt dynamically with varying layouts &ndash; note: no Javascript, just plain CSS. The solution is two fold: In the <head> tag, add the following <meta> tag: In the CSS file, add special CSS rules for varying screen sizes using this syntax: @media (max-width: 1024px) { /* CSS rules for…

DNS migrated to Amazon's Route53

As of 3PM PST on 07/10/2012, the DNS provide for my domain saicharan.in is Amazon&rsquo;s Route53 service. Here is the migration log. $ sudo pip install cli53 (see installation notes ). Choose to &lsquo;see the zone file&rsquo; on Gandi.net&rsquo;s DNS zones page and copy the zone file contents. Create a file name saicharan.in containing the copy of the zone file from previous step. As explained…

Chrome Sync with Google Apps Accounts

To enable Chrome Sync with a Google Apps account , the admin must enable this feature. Instructions are in comment 64 as suggested on stackoverflow.com .