Having some (or all of) your files synced with a cloud service provider is a good call. It is helpful to have backup in this form and it makes the files accessible from any device (provided you have an internet connection). But most cloud providers provide client programs only for Windows or Mac. As of 2022, only Dropbox provides an official client for Linux. But sadly, their free plan only provides 5 GB of storage. I, being broke, prefer to have the 15 GB of free storage provided by Google drive. It is enough to have my most important files backed up. So I started looking up hacky ways to set up a system that syncs my files with Google drive.
If you have just installed a basic window manager on your arch setup, it is highly likely that hibernation is not set up on your system. I hibernate my system very often and therefore, it is one of the first things that I set up on my system. This is a guide that I have prepared by stealing simplifying instructions from this archwiki page.
Since childhood, I have made several attempts to play chess regularly and reach a level of competency where I get a good grasp on skills like board vision, openings, endgames, etc. The attempts start off well but then I forget to play or give up eventually. This is yet another attempt to do so and hopefully it will be a success or atleast this attempt should last longer than others. I am currently following a chess playlist by NM Robert Ramirez that should cover much of the basics. But anyways, my failed attempts have taught me that studying tactics won’t help if I don’t play regularly.
This week, a friend of mine complained that her linux install was freezing at random times and the only way to fix it was to restart the computer. I have had this issue previously and I wasn’t able to fix it even after reading through several pages of journalctl
(probably because I am dumb T-T). Eventually, this issue was fixed when I installed a new kernel so it was probably a bug with the linux kernel, or drivers interfering with the kernel. In such situations downgrading to a previous kernel can be messy so I usually keep a second kernel installed (usually the lts
kernel) as a fallback.
I use the neovim plugin nvim-lspconfig
and for python, it requires minimal setup and works fine most of the time. One issue that I repeatedly face when working on python projects involving image manipulation is the lack of code-completion and missing type stub errors for the cv2
(opencv-python) package. The working solution is to manually generate type stubs for the package.
There have been multiple instances where I search for cli pdf utilies and always end up in stackoverflow searching for a tool that has minimal dependencies and with the required set of options. I usually end up using the utilies pdfunite
and pdfseparate
found in the poppler
(arch) or poppler-utils
(debian/ubuntu based) package. I occasionally find myself using qpdf
or gs
too. (will update)
So you wrote a new algorithm for a task or maybe you are re-implementing a known algorithm and want to verify the time complexity, a mathematical analysis is the best way to do so but you could also arrive at the same result using two simpler methods that I discuss in this article.
Before working with ARM assembly, you need to have the arm compiler toolchain installed. If you are on debian-based distros, you can run sudo apt install gcc-5-arm-linux-gnueabi
, arch users can install the package arm-none-eabi-gcc
using pacman
.
I like to make digital notes.
This blog is now built using jekyll
, I previously used lb
that was very minimalist but required writing the content of the posts in html
, I could have created a pipeline to convert markdown into html but why make it so complicated when jekyll
allows me to mix html in markdown and vice-versa.
I wanted to set up printing with my HP Laserjet printer on my thinkpad, I have previously setup printing with this device on ElementaryOS so I know it works seamlessly with HPLIP. Now I wanted to replicate the same on my new machine. I looked up articles on printing on the archwiki and found something about CUPS. I started reading but due to my social media induced short attention-span, couldn’t read more than five lines, promised to read later and proceeded to install the package using pacman
.
I used to manage this blog by logging in to the VPS and then running the lb
script to make new posts and edit or delete old ones. It kind of got tedious and I was always thinking of switching to using rsync to synchronize remote folders like this blog folder. I finally got around, installed rsync and looked up the man page. I needed a way to use the private key for the remote login so I found this useful command that downloads the remote folder to my local machine:
Yes, I have fallen for the infamous thinkpad meme and bought one.
Sometime this year, I realized that manually managing a cloud folder in google drive/one drive is a time consuming process. One needs to open the drive website and then manually upload the files to be updates/copied. These websites are large and take quite a lot of time to load and I find it specially frustating when I am in hurry and the uploading process doesn’t even start.
I run this site on a VPS and as for vpn I use OpenVPN that passes my traffic through a VPS. I am too lazy to periodically access one of these servers and manually run sudo apt update && sudo apt upgrade
. I found these commands and config files that will periodically update the system and also reboot at a specific time if required for important kernel updates.
I have bad internet connection at home and I need to frequently connect to a VPS via ssh. When the connection is slow, there is a big lag in between my typing and the keystrokes appearing at the server terminal. This is especially worse when I need to edit files in vim
. At one point I used WinSCP to edit the files in a GUI where it loads a local copy for editing and then copies the local edits to the server when I save it but I wanted a better solution for this, one where I don’t need to leave the CLI. So, mosh came to the rescue.
I have been studying a little about share markets and mutual funds investment and in near future I plan to invest some extra cash so just for records I wanted to make some notes about the topic.
My cousin asked me to help with the documents required for a college form website so I checked the site but was too lazy to write it all down. I quickly wrote the following python script, grabbed the form labels and sent him the list. I think this could serve as a good boilerplate code.
It is very annoying when I look up something in a different window and then switch back to the ssh terminal only to find out that the connection has timed out and I need to log in again.
One way to solve this is to send null packets at regular intervals from the client side. Open the ~/.ssh/config
file and add the following lines: