Categories
linux

How to Cut and Download Youtube Videos using Command Line

In some of my free time, I am actively using Instagram, not to show off or seeing people’s life that I don’t even care about. For me, this social media is perfect for everyday reminders for positive feeds. Usually, people choose a youtube video at the best moment, then re-post it on Instagram as a short one-minute clip, and sometimes I do so.

Well, the process of downloading, cutting, then re-posting it on Instagram is easy but not a quick task, especially if you do it on your phone. Then I thought it would be better for us (people who loved to share short clips from youtube) if we can do that in just one step. But first, let’s check what are the tools available for this task.

Categories
linux Programming

Git Pristine: How to Pristine Clean Your Dirty Git Repository

I found this command useful and I love this alias!

git pristine, a command that will wipe any dirt on your local git copy, any untracked files, and the cache will be removed to make it pristine clean as the remote origin.

Categories
Understanding

Now I Understand: What is Independent and Identically Distributed (IID) Random Variable

I was working with my friend on a Random Number Generator (RNG) research paper. We need to evaluate the quality of our random bitstream result using the NIST SP800-90B entropy test.

Categories
linux

Simple Way To Change Pop Os Default Login Monitor

I use three monitors, one of which is in a vertical position. Sometimes the login screen on Pop OS appears on the main monitor, sometimes it appears on a vertical monitor, but in a horizontal position. Like it or not, I have to log in with my head tilted.

Although if you look at the positive side, this can be counted as stretching in the morning. But I don’t need it and it’s very annoying. Believe it or not, this has been going on for almost 2 years and every time I log in I feel like I need to fix it, but after logging in, I forget and get lost in my works.

Categories
Programming

QEMU: How to Enable Plugin Build

By default, QEMU does not enable the plugins. So you need to enable it on configure step by using --enable-plugins.

Categories
Programming

This Makes My RISC-V Trap Handler Does Not Work

I was working on a RISCV assembly when suddenly I got a weird issue.

The exception does not get caught in the trap handler. I thought this was a QEMU bug on the RISCV target because the trap handler works on my other code.

Then after a day of digging, I figured out that it was the mtvec needs to be aligned on 4-byte, as mentioned on the privileged ISA.

Categories
linux Programming

The RISCV ISA Documentation Is Better than RISCV Green Card

I hosted the RISCV ISA Documentation. This is really helpful if you want to learn about the assembly syntax or learning the RISCV itself.

As a beginner, this documentation is more effective instead of constantly checking at the green card. 🙂

Categories
linux Programming

My Quick Ways to Auto Format Code in VSCode

I don’t have much time to format my code to looks neat in VSCode (Ctrl + Shift + I), but the default formatting from Visual Code is not efficient for me. It makes the first bracket on function placed alone in one line. This makes my code longer!

Categories
Programming

Stuck at Debugging RISCV on Arty A7 using J-Link

Running the RISCV Processor

I got an Arty A7 board coming to my desk, and I’m curious to try running a RISCV processor on it. Not long after following the tutorial from Digilent, I was able to program the RISCV processor on this board just by using a MicroUSB cable.

Running the Program on RISCV

Now I have a RISCV running on this Arty A7 Board. I need to run a program. After a couple of minutes of researching, I found this post, I was able to put my program running by putting it on *.mcs that I build from the SiFive Freedom GitHub repository.

Categories
linux

How to Start a Fresh Raspberry Pi without Monitor

I mean using SSH, because HDMI, mouse, keyboard, and monitor will eat up the whole space in my desk.

Prepare the Raspberry Pi OS

Firstly we need to get our microSD card with bootable Raspberry Pi OS. I recommend to use Raspberry Pi Imager to make this process easier. We just need 3 steps, download the Raspberry Pi Imager then chose our preferred OS, select the SD card, then write.