Tuesday, February 10, 2026

Watch anime from Linux command line

This is a really cool feature for anime lovers. You can search and watch anime just from the command line, how convenient is that? All the commands below were run in a Linux Mint, please adjust accordingly if you are not using Linux Mint 😁


Step 1: Launch your terminal

Step 2: Download and install ani-cli and mpv player
$ sudo apt update && sudo apt install ani-cli mpv -y

Step 3: Search for your favourite anime using ani-cli command. In the following example, I was searching for "One Piece" anime 720 video quality. If you somehow prefer vlc, you can add -v option. BY default it will use mpv video player.
$ ani-cli -q 720 one piece

Step 4: Choose from the list, which entry (or season) that you wan to watch


















Step 5: Choose the episode






























Step 6: Watch your anime 



























Optional step: Once you know the list number and episode, you can directly go to the view by using below options:
$ ani-cli -q 720 -S 1 -e 1 one piece

Happy watching!

Thursday, February 5, 2026

Using splits in vim

Using split is a way that user can open multiple documents in one vim session, but all the documents will be displayed in one display, split across the screen.


For example, we want to copy some content from /etc/passwd, into a file called /tmp/mylist

1. open /etc/passwd
$ vim /etc/passwd

2. To create splits 
  • to create vertical split and divide vim into 2 panels side by side, with the new panel opening /tmp/mylist
:vsp /tmp/mylist
  • To create a horizontal split and divide vim into 2 parts, bottom and up, with the new panel opening a file called /tmp/mylist, use this command
:sp /tmp/mylist
  • You can also create an empty buffer on the new horizontally split panel
:new 
  • And to create an empty buffer on the new vertically split panel
:vnew

3. To move between panels
  • ctrl-w h or ctrl-w left arrow to move left
  • ctrl-w j or ctrl-w down arrow to move down
  • ctrl-w k or ctrl-w up arrow to move up
  • ctrl-w l or  ctrl-w right arrow to move right

4. To close, use below commands 
  • :q to close current panel
  • :only to close other panels except the current one
  • :qa to close all panels
  • :qa! to force close all panels without saving

5. To resize the panels
  • ctrl-w + or ctrl-w - to increase or decrease the current panel's height
  • ctrl-w > or ctrl-w < to increase or decrease the current panel's width
  • ctrl-w _ to maximize the current panel's height
  • ctrl-w | to maximize the current panel's width
  • ctrl-w = to make the panels' width and height uniform
6. To open multiple files in split mode
  • vim -o file1 file2 to open file1 and file2 in horizontal split
  • vim -O file1 file2 to open file1 and file2 in vertical split

Monday, February 2, 2026

Using buffers in vim

Using buffer is simply a way to open multiple documents in a single vim session.


For example, you want to open /etc/passwd, and copy some of it contents into a new file called /tmp/mylist. 

What you would do:

1. open /etc/passwd
$ vim /etc/passwd

2. while in vim, open a new buffer 
:e /tmp/mylist

3. To list all opened buffers, we can use :ls. This is also a way you can know the buffer number
:ls

4. To move to a buffer number
:b <buffer number>

5. We can also use some part of the file name to move to the buffer that the file is opened
:b passwd

6. We can also use :bn to go to the next buffer in the list, or :bp to go to the previous buffer in the list

7. To copy contents between buffer
  • highlight the text that you want to copy in the current buffer (v)
  • then use the usual yank (y) to copy the highlighted texts
  • switch to the target buffer using (:bp), (:bn), (:b number) or (:b filename)
  • paste using paste command (p)

Wednesday, November 6, 2024

Rotating screen in Linux Desktop

Sometimes we need to capture an output of a command that is quite long, it could not fit in one screenshot. Rotating screen is one of the way to make the screen estate longer, but in linux, the method is not as straight forward as in our smartphones.


To do this, one of the method is using "xrandr" command. 

The usage is fairly simple, just use xrandr with "-o" option, and which way we want to rotate the screen to.

For example, to rotate the screen left, we use:
$ xrandr -o left

To rotate the screen to right:
$ xrandr -o right

To invert the screen:
$ xrandr -o inverted

To rotate the screen back to its normal position:
$ xrandr -o normal

Do not worry though, only the screen is rotated, your keyboard and mouse still work the same.

Thursday, October 10, 2024

Installing docker and docker compose on almalinux 9

Docker does not explicitly support almalinux, so we have to use centos repository instead.


Below are the steps:

1. Update system
sudo dnf --refresh update
sudo dnf upgrade -y

2. Enable docker repository
sudo dnf install yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. Install docker
sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

4. Enable and start docker
sudo systemctl enable --now docker

5. Add user to docker group
sudo usermod -G docker -a myuser

6. Refresh group list 
newgrp

7. Check docker and docker compose version
docker version
docker compose version