Posts

Gitlab repositories and ssh keys Pt 1

We have been using https authentication for a while in my current organization for accessing git. As the number of repositories I have been working on increased, I found it difficult to do this manually. So I decided to use ssh keys to access my forks of the actual repositories. So my access model is like below. 1. I add a SSH key for my office desktop in gitlab. 2. Then I modify settings in all my forks to add and enable the ssh key for access. 3. Then I create a folder where I'll keep all this code. Then I clone everything to this folder.  4. And lastly I use a small shell script to run git pull so that I can update these with one command and no pesky passwords. From security perspective though, I have to ensure my desktop is not stolen and my keys are secure. Lets see the steps in detail in next parts.

Opening a NPS account

NPS stands for National Pension System. It's a new better-returns with more-investment system provided by the govt of India for primarily private / unorganized sector employees. You can simply search for "why should I invest in NPS" in google and get any results like https://www.etmoney.com/blog/6-benefits-for-investing-in-nps/ . Basically if you have extra money and think of future retirement planning, then better to invest a portion of it in NPS. One big advantage is upto 50000INR is tax-deductible. And if you are like me whose some income is eligible for 30% income tax, this 50000INR deduction can save about 15.5K which is not a small amount. From last couple of years the NPS enrollment procedure is fully digital and if you have a working Aadhar authentication with either OTP or virtual aadhar, this process becomes very easy. I tried to enroll last year, but there were some glitches in authentication and it did not work out. This year in March 21, when I was looking at...

Find and execute a command on found files

Very useful command: find -name *.xml -exec cp -f {} /home \; {} is replaced by found file paths.

Lenovo G405 Ubuntu touchpad not working after resume

What worked for me: create /lib/systemd/system-sleep/touchpad : #!/bin/sh case $1 in post) /sbin/rmmod psmouse && /sbin/modprobe psmouse ;; esac make file executable chmod +x /lib/systemd/system-sleep/touchpad and test (suspend computer and wake-up again) Solution from: https://unix.stackexchange.com/questions/309247/linux-mouse-freezes-after-suspend

Using Ubuntu Mint on Lenovo G405

Frankly it was not a good experience. VLC kept hanging, lots of small issues kept popping up. After some tries, I had an epiphany one day and I decided to install ubuntu-desktop package and it got me gnome. VLC does not crash anymore, system is more responsive, sleep does not work yet but that is because I decided to select LightDM instead of GDM as display-manager. This laptop seems to have some issues in general like mal-working MTP, a mysterious device that keeps showing up in windows and eventually malfunctions. It's supposed to be something related to lenovo energy management. But I am not sure, and sadly being out of production and more than six year old, there's very little hope of getting better drivers etc for this one. So I'm going to get a new battery and put it in there, and at least that will make this thing run for a couple more years. Thankfully hardware-wise it's fairly complete. Only thing I am not sure about is - if it needs a cooling system overhaul. ...

Lenovo G580 parting, and G405 maintenance

Image
The other lenovo in the family - Lenovo G405 which my father is using, recently lost its battery and so father asked me to get a replacement (battery). But due to geographical constraints and COVID I could not do that. Also my recent visit was going to be only a day so I decided to just go ahead and overhaul my Lenovo G580 and give it to father. That meant a number of things - open up chassis and clean it up, replace it's dead battery, check out keyboard if it's going to fail again, and few small things. Luckily I had just couple of years ago opened this one up completely and replaced it's CPU's thermal grease, and it's been running quite cool. It seldom goes over 57 degrees which is great for a 2016, 28nm part with 35W TDP. So I spent 3-4 hours getting all this done. Got a Lapcare replacement battery for 2000Rs which will be good for another couple of years. Rest all looked great. Then last month I visited my hometown and exchanged laptops. Now the G405 which I got...

Dashcam for CAR

Image
Driving in Indian road traffic is an adventure. And when someone may crash into you, you can never tell. So it makes complete sense to have some sort of surveillance for the car. I spent about INR4500 ($62) and got this below car dashcam.  https://www.amazon.in/A2-Continuous-Monitoring-encoding-G-Sensor/dp/B086XDLB6N This chinese-made ( There are some europian-designed made-in-china dashcams but they are costly! ) dashcam can record in upto 1080P resolution and supports upto 128GB SD Cards. I am using a 32GB SD Card and it can record upto 7Hrs of footage in 32GB, and then it starts overwriting older files. The footage is of decent quality, you can catch other vehicles number-plates in daylight. One good thing with this particular model is it comes with hardwire-kit and you can directly plug it into your car's fusebox and that means your single cigarette-lighter port remains free to use during driving. This camera has a capacitor inside which can help save emergency videos in case ...