Om's Blog

Articles, thoughts, misc

What makes a good Pull Request?

June 14, 2024 — Om Raheja

Recently my first pull request to the AIOS Project was approved. Having never contributed to such a large project before, I had to navigate the complex realms of teamwork on GitHub.

Read more...

May Update

May 31, 2024 — Om Raheja

It's been more than a month since my last blog post. In this month, the changes I've made would make me completely unrecognizable to myself from April.

Read more...

Back to Linux Sanity

April 27, 2024 — Om Raheja

It took me two months and eight days to realize how important convenience is to me.

Read more...

Repair broken luks GRUB config

February 19, 2024 — Om Raheja

I was messing with my computer's grub configuration because I didn't like entering my password multiple times. After clicking on a random StackExchange link and doing exactly as it said, I quickly ran into some kernel panics on the next boot.

If you are stuck in a similar situation, not to worry! Your computer will be in prime condition in no time... or at the minimum you will be able to get your files back.

The process:

  1. Obtain a USB & burn Alpine

  2. Install cryptsetup and lvm2 on Alpine

  3. Mount your system to /mnt and chroot

  4. Edit your grub config and reboot

Alpine USB

If you have a bootable USB lying around, go ahead and use it. Alpine is used for this guide due to its usability. Note that the instructions may differ.

Otherwise, for the purpose of this guide burn a 200 MB disk image to the Alpine USB. Should be finished rather quick.

Boot using the USB and enter root when prompted for login. There is no password.

Prepare the tools

The quickest way to get everything setup is to run setup-alpine. Once the script prompts you to add a new user or create partitions on the disk, do not proceed. Exit the script with CTRL+C.

I did have a few issues getting wlan0 to start properly. If you have those, please exit the installer and run setup-interfaces. If this does not work, do the following:

ip link set wlan0 up
ip link set eth0 down

Run wpa_supplicant manually to connect to the network. Try running udhcpc if you cannot ping any IP addresses.

Once the network is working, run the following:

apk add cryptsetup lvm2 lsblk

Now, all we need to do is mount the system. First, let's decrypt the disk.

lsblk

Once you find the disk name (/dev/sda most likely), find the partition you want to mount (probably /dev/sda1) and decrypt it.

cryptsetup luksOpen /dev/sda1 vault

Enter your password. Now you want to activate the volume group so you can mount partitions as necessary.

Obtain the volume name from the following command:

vgscan

Activate the volume:

vgchange -ay [name]

Read your logical volume table:

lvscan
lvs

And now you are equipped with which volumes need to be mounted, and hopefully you remember where they were mounted on your system.

Chroot

This depends on your exact volume table, but for simplicity mount all the volumes. If you aren't sure, just mount the ones that can give you access to the grub configurations at /etc/default/grub and /boot/grub/grub.cfg as well as any other needed files by grub.

Mount your volumes to /mnt. My table included the following:

  1. vg0-root
  2. vg0-home
  3. vg0-swap

Skipping swap, I ran the following:

mount -t ext4 /dev/vg0/root /mnt
mount -t ext4 /dev/vg0/home /mnt/home

...even though I don't necessarily need the /home partition, it will still be useful in case I cannot repair my grub configuration.

Now, we just need to prepare the chroot:

mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc

Chroot into the mounted filesystem

chroot /mnt

And now, you're in!

Repair and reboot

Usually, I note what changes I make to my grub file in comments and on a piece of paper if needed. In my case, I just had to edit /etc/default/grub and find the line I had to change. At this time, you have access to whatever editor and packages you had on your system before breaking grub, so use the editor of your choice.

After writing your changes, run the following:

update-grub

Reboot into your repaired system. If you still have kernel panics, follow this guide again to troubleshoot or in a worst case scenario, back up your files and reinstall the OS.

Thank you for following my guide. Please let me know of any questions, comments, or concerns you may have. Be careful when modifying the grub config again!

Tags: development, guide

We love bash scripting!

February 11, 2024 — Om Raheja

As I was in the throes of configuring my mail client, I was jolted back to reality by the sight of my unfinished chemistry homework. Without a moment to lose, I seized the paper and gave it a quick once-over. It became apparent that I needed to meticulously label and number the axes of the graph.

For the x-axis, I had 38 points to mark. Swiftly, I assigned numbers from 0 to 14, allotting 2 boxes for each. The simplicity of this task spared me any complex mental gymnastics. However, the real challenge was yet to come.

The y-axis was a daunting grid of 50 boxes, needing to be numbered from -200 to 250. The thought of doing the calculations mentally was unappealing, to say the least. So, I turned to a more efficient solution - a bash script that would do the work for me in a matter of seconds.

I promptly opened a new file and embedded the following script:

#!/bin/bash
num=-200

while [ "$num" != 250 ] ; do
    echo $num
    num=$(expr $num + 9)
    read e
done

My task was simplified to merely reading a number and pressing enter to label the next cell.

This, I believe, is the true beauty of coding. It empowers you to automate simple tasks in a blink, saving precious time and effort that a machine can spare. While there are numerous reasons to create full-fledged programs, like the neovim I'm using for this post, the real value for an average person lies in these small yet significant automations.

This journey with the command line began two years ago and since then, my efficiency with technology has grown leaps and bounds. Why should I twiddle my thumbs waiting for Gmail to load, when I can swiftly navigate my emails using keyboard keys via the command line? Why waste a minute loading YouTube (or Invidious, for that matter) when I can simply run ytfzf from my local terminal, opening mpv to enjoy videos while multitasking on my homework?

So, here's to a safe and enlightening journey with bash scripting!

Tags: development, command-line

Snow Day

January 19, 2024 — Om Raheja

Today is a beautiful snow day with a day off from school, yet I am at home, inside, studying. We had a snow day on Tuesday, which I also didn't go out on.

What's going on?

I'm working on:

  1. my AP exams

  2. my GPA (yes, my grades are really bad, even though they've improved a lot from freshman year)

  3. my petiton: I'm working on getting approval from my school and other schools in my district's administration to spread my petition on school grounds. It's not bound to be very effective, but since I spend most of my time here, I may as well start here. Since I live near bustling universities, I probably will contact them too.

  4. my business: I definitely need a website for my business with good SEO so that people can look me up and feel confident. I've got it all outlined out and me and my team are working on the CSS for the site (which will definitely look way better than my main site) but it seems like it is better to hire a freelancer on fiverr; they charge low rates and they make decent websites. I've found several people with React and CSS experience for as low as $5. However, my team has agreed to give the CSS an attempt first, and then consider hiring an actual developer. I agree with this decision, but the idea of hiring a freelancer will remain in all of our heads.

  5. swimming: We have the county championships coming up at our school in about a week. I will be swimming my favorite, 400 free, but I need to tighten up my game before I go out there and race.

  6. FBLA: I have yet to finish selling candy bars to fund our State Leadership Conference. In addition to that, I have to prepare for my Computer Problem Solving objective test, and the Business Ethics team presentation.

Should I take a break?

I love to get my work done, and I have a lot of work on my hands. I recall the last time we had snow in 2022, there was nothing stopping me from getting out there. But that was also 2 years ago, and things have really changed since then. The January of 2021, being the one during COVID and middle school is particularly memorable to me, because I just allowed myself to roll all over, throw snowballs, build a fort and whatever with my sibling.

As with most things in life, it's a tradeoff. I don't know if I still enjoy running everywhere in the snow, and I don't think we are getting more snow days this year. Therefore, it may be worth the experience?

Tags: development, waste-of-time

New Curriculum!

January 15, 2024 — Om Raheja

After days of work, I have finally released a sample version of my curriculum that are taught in my classes. It can be accessed here. My reasons for creating this curriculum are as follows: - For parents to get a general idea of what is being taught - To improve my own organization - To establish a set of guidelines for any instructors I hire/volunteer for me.

My ambitions

I really want to take this far; I want other high school students like myself who are passionate about education and computer science in some way or the other to aid our future generation in experience. Not only will it help the students, it will likely help the instructors more, as they will improve their knowledge and will become better at explaining. I believe anyone can work with me on this project in any way, even if they don't know anything about programming or circuitry, because a lot of this involves developing intution of both the student and their instructor and improving problem solving.

I also want to expand this into other areas like math, finance, and economics, as those are among my favorite subjects. However, this may be more of a long term goal due to my constraints and amount of customers. The potential amount of customers is much higher because there is a lot of push by parents for these topics and we have a higher chance of appealing to the parents because of our specific tailoring. That being said, the market is also highly competitive and it is very easy for other businesses to be established. As competition is unavoidable, a good solution may include acquisition or developing better intangible assets. However, this is out of the scope of my business for now.

Join!

I want to establish as wide a network of teachers and students as possible because I really believe in tailor-based education. If you are interested in learning or teaching, whether virtually or in person, please mail me.

Other projects

The most important project that comes to mind is my petiton for improved privacy laws, which needs a formal signing process. I will code a server based CGI script to hold form responses in a CSV soon, but I need my school administrators to allow me to advertise in school so I can gain traction. Me and my team are very excited for the potential of this project and are hoping we can get this to pass in the New Jersey senate.

I have additionally started learning latin due to its various applications in English and Spanish and so that I can better understand latin root words on the SAT. While that was my reason to start learning latin, now I am genuinely interested in the language and want to improve my language learning as well. I am using Hans H. Ørberg's Lingua Latina I textbook so that I can best improve my knowledge and learning ability by using the natural method. It's quite interesting, because I'm picking up the language the same way I picked up my native language, and that really affects my ability to speak, read, and write in it. I suggest all language learners start with the natural method if possible, because it is the most effective, as per my understanding.

Tags: development, business, education

General Reflection

January 13, 2024 — Om Raheja

It is currently late at night, and instead of sleeping, I am up writing this blog post. I'm likely to wake up the next morning in utter confusion of what I have wrote here tonight.

BashBlog (continued)

I tried to configure bashblog to work better, by perhaps intregrating the blog and the frontpage together, but such a project is not for me. I don't want to poke around with the internals of this 1,000 line script any more than I've done already. If I feel like pursuing this later, you'll see the site look a lot more unified and improved.

There also seems to be this weird glitch with an unnamed post in my blog, which caused the timestamp "January 08, 2024" to randomly appear at the top. I don't know how to fix it yet, but I will because I don't like it. That being said, once the front page hits its post limit, it may also disappear.

That being said, I probably will unify the CSS in some way later, and will definitely work on SEO (Search Engine Optimization) first.

FBLA Summit

I went to a Future Business Leaders of America regional summit on Friday, and I learned quite a bit. Let me sum it up for you: - I improved my confidence a lot more, because of the networking and law session that I chose. I can't say I liked one more than the other, as I met people from vastly different environments who had a keen interest in the business world and who also would like to make new friends. The law one was my favorite, because it enforced some of the concepts I was taught in my JSA experience, and how statistics along with theoretical makes your argument more convincing. - I gained a lot of useful knowledge and contacts. More than business related knowledge, I think I gained a new outlook on life. I came up with a better process to present myself in the professional world involving a set of rigid core values, which I followed already but going to summit helped me enforce those values. I met people who could help me accomplish my hopes and dreams and saved their contact information. - I had fun. It's not everyday I get to take time off from school, much less I get to meet new people. I don't dislike school, but a break is appreciated from time to time. Alongside of being a professional summit, it was generally a place for me to be social and for me and my friends to enjoy ourselves.

Personality Change

Think it's kind of strange, but I'm picking up on developments in my own personality over time. I don't know how common this is or anyone else who notices changes like these, but I thought I would write about it anyways, since it seems interesting.

A quick google search of personality change doesn't yield much, except for the bipolar disorder, and the like. I am highly doubtful that there is any correlation between my experience and mental disorders, but instead a response to my environment.

As time goes on, it seems as if I idolize things or people much less. I recall at the start of this school year, I was very disappointed to find out that I would not be able to spend as much time with a friend from a neighboring district. At the time, she meant the entire world to me, and I'm glad that I was able to express that even though it took me a few days to get all my thoughts and emotions out.

Eventually, it came to a time where we would not be able to meet each other for almost a month at a time, which at the beginning was pretty degrading on my emotional health, but as time passed, those emotions started to disappear. In fact, the first time around, it seemed as if the inverse had occured, that I hadn't met her in so long, that I didn't want to meet her at all. I didn't want those powerful emotions to be invoked again.

And when I met her after that, it was as if I was a different person. I became completely distant and she wasn't sure what to do with me, which is funny in retrospect. The pattern continued, and by the end of this arbitrary cycle my interactions with her became completely distorted, but in a more positive manner.

These interactions, in fact, are what helped me to realize this change. A few months ago, maybe in the start of September, I was more reserved, very honest and didn't really say much other than deep talk. Now, I wouldn't say I'm the complete opposite, but I'm much more outgoing and a burst of energy. It's easier for me to form interactions this way, now that my confidence has improved, which came from a lot of public speaking in JSA. My interaction type in September wasn't bad, it was just less like myself. I'm a lot more goofy than most people are.

That brings me to another point. It was commonly accepted in my area that being goofy was a simple way to protect yourself from real emotions. In retrospect, that is partially true if you are concealing your real emotions, but my heart desires me to do stupid things and make stupid jokes, so that itself is part of my personality. Whether it protects myself from "real emotions", or is negative in general and lowers my reputation or whatever, it doesn't matter in the end because this new interaction type has made me a lot happier and has definitely improved my confidence.

As another example, I had this other close friend who I wasn't able to understand, and was under the severe misconception that she disliked me because she wanted to get work done during free study. Now, I spent the majority of my school day with her, knowing her only for 2 months but we had already gotten so close together, irrespective of our differences. The next day, I went to school without talking to her, and felt like garbage. I decided to tell another friend how I was feeling, even though we weren't that close. It eased the pain a little. The next day came, and it hurt a lot, but this time a little less. I quickly moved to make new friends because I realized that if I continued to get hurt through my lack of interaction with her I wouldn't last very long.

A few days later, I wasn't able to take it anymore, because she was sitting right in front of me and doing her work during free study. On a completely divided basis, I decided to go sit next to her and finish my work, not knowing what else to do. And so I made up a stupid excuse to sit next to her, and she saw right through it... but I sat there anyways and didn't say anything and just finished my work.

She looked at me a couple of times, confused, and scrolled through some reels on her phone. I glanced at her from time to time but I was bent on finishing my work, and that's what I did for the most part. Eventually she saw a funny reel and showed me and we both started laughing, and it reduced the intensity of the mood a lot. By the end of it, I asked her if she was mad at me, and after hearing her response I felt significantly relieved.

I did not sit with her with the intention that the conflict would be resolved. It was a risky decision and could have hurt me potentially, but I was confident that I could take the risk, knowing very little about her emotions, I did.

To simplify, it seems as if my personality development has stemed from a confidence change. I can project much better, make jokes in front of a whole group of people, laugh at my own mistakes, and feel good too. At the beginning, I mentioned that I stopped idolizing people and things. For people, it came to me that I can form deep connections with any kind of people, I just have to stay confident throughout the process.

I'm also experiencing personality change in other parts, of my life, not just my connections. I stopped worrying about my grades and whether my GPA would permit me to go into any college, and started focusing more on enjoying the work I did at school. It wasn't necessarily easy nor is it anything I want to do, but I took an interest in it and the process of learning and my grades have reached much higher than they have before.

In swimming, I'm not always sure about whether I can beat the competition or my own personal records at all, but I've been working harder in practice since November, to increase my confidence as a swimmer. This can also be extended to other parts of my life, as my willingness to purchase stocks with my own hard-earned money (after thorough research), asking for letters of recommendation for various summer programs, and so forth. My personality change seems to be constructed out of a push for confidence, which definitely has created a lot of upsides and has also made me unrecognizable to my friend listed above, as well as my other friends, family, past teachers, and colleagues. I would infer then, that a confidence boost has a significant amount of indirect upsides through the modifications of my own physcology. However, I still have a lot of improvements to make, so I will continue to work on my confidence.

Tags: waste-of-time, growth, development