How to stop AWS Workspace with CLI

I need to stop a WorkSpace now and I don’t want to login to AWS WorkSpace console. The following is the steps I’m literally taking to achieve this goal. Find out the WorkSpace ID, assuming that my AWS CLI has been setup correctly. ❯ aws workspaces describe-workspaces { "Workspaces": [ { "WorkspaceId": "ws-9xm222222", "DirectoryId": "d-9767555555", "UserName": "kenno", "IpAddress": "172.xx.x.xx", "State": "AVAILABLE", "BundleId": "wsb-clj855555", "SubnetId": "subnet-0a4ae4b324a799999", "ComputerName": "A-2B99WV33TITAN", "WorkspaceProperties": { "RunningMode": "AUTO_STOP", "RunningModeAutoStopTimeoutInMinutes": 60, "RootVolumeSizeGib": 80, "UserVolumeSizeGib": 50, "ComputeTypeName": "STANDARD", "Protocols": [ "PCOIP" ] }, "ModificationStates": [] } ] } We can see that the WorkSpace ‘ws-9xm222222’ is in AVAILABLE state....

August 9, 2023 · 2 min · 249 words · kenno

How to delete one word backward in Vim

The following is a sample of text opening in vim/neovim with line numbers: 1 What would be the command to delete one word backwards? 2 I know we can use ‘db’ to delete backword, and it would work 3 as what I wanted if the cursor is on the last character. Assuming that my cursor is under letter ‘a’ of the word ‘command’ in line 1, and I want to delete the whole word ‘command’....

August 8, 2023 · 2 min · 322 words · kenno

Query Latest Debian 12 AMI Id Using AWS SSM Parameter Store

Debian publishes their releases of Amazon Machine Image (AMI) for bookworm at Debian bookworm on Amazon EC2 [1]. There, you can find the AMIs for various regions and two architecture amd64 and arm64. Another way to search for AMI for Debian 12 (bookworm) is to use AWS CLI with describe-images. Here is an example on how to list the 3 most recent AMIs of Debian 12 (amd64 architecture), sorted by most recent to the oldest:...

August 5, 2023 · 2 min · 365 words · kenno

Installing Jellyfin Media Player on OpenSUSE Tumbleweed

As of today, Jellyfin Media Player is not available on (official?) repos for OpenSUSE Tumbleweed. To install it, I need to first add a repository, kind of like Fedora Copr, which provides this package. $ sudo zypper addrepo https://download.opensuse.org/repositories/home:playablepliable/openSUSE_Tumbleweed/home:playablepliable.repo [sudo] password for root: Adding repository 'home:playablepliable (openSUSE_Tumbleweed)' ......................................[done] Repository 'home:playablepliable (openSUSE_Tumbleweed)' successfully added URI : https://download.opensuse.org/repositories/home:/playablepliable/openSUSE_Tumbleweed/ Enabled : Yes GPG Check : Yes Autorefresh : No Priority : 99 (default priority) Repository priorities are without effect....

July 29, 2023 · 3 min · 514 words · kenno

Connect to Wifi with nmcli

First check if the Wi-Fi device is enabled or not: $ nmcli radio wifi If the output shows that the Wi-Fi is disabled, then it can be enabled with: $ nmcli radio wifi on If we already know the access point, then skip the following step. Otherwise, to identify the access points, run: $ nmcli dev wifi list Supposed we want to connect to the access point named ’totoro’, and the password is ’t0t0r02023’, we can connect to it by running the following command:...

July 23, 2023 · 1 min · 151 words · kenno

Changing Permalink in Hugo

This post is related to the previous one about changing a theme in Hugo. After I changed the theme to “PaperMod”, I realized that each article or blog post is under ‘post/date’ URL path. For example, the following is the permanent link/path of a post: https://blog.khmersite.net/post/2023/06/changing-hugo-theme/ Previously, there was no word post in the URL path, and I still want it gone again with this new theme, as below. https://blog.khmersite.net/2023/06/changing-hugo-theme/ The problem is, I forgot how it was done!...

July 15, 2023 · 1 min · 147 words · kenno

Changing Hugo Theme

Had you visited this blog recently, you may have noticed that the blog’s theme has changed. Here is a quick note on how I changed the theme of this blog from cayman-hugo-theme to PaperMod. For a little background, Hugo themes are installed as git submodule. Want a quick recap on how to use Git Submodule? Here is a good content [0]. First, the current theme needs to be removed: $ git submodule 4a924cef54081b61530a30bd69d442ae99916561 themes/cayman-hugo-theme (heads/master) $ git submodule deinit "themes/cayman-hugo-theme" $ git rm "themes/cayman-hugo-theme" $ git commit -m 'remove theme cayman-hugo-theme' Add a new theme, PaperMod [2] as the submodule....

June 20, 2023 · 1 min · 173 words · kenno

How to find EC2 instance ID from a known private IP using AWS CLI

When I first started to use AWS CLI, I felt overwhelmed, and I wondered how long it would take me to be familiar with the tool. Fast forward to many months later, I find the AWS CLI very pleasant to use. For example, there are same patterns and the CLI reference page online is quite useful. Anyway, like many thing I’ve learned about Linux, I learned and could retain the information better with practice and document....

May 26, 2023 · 1 min · 208 words · kenno

How to Zip a file using command line

I normally use gzip for file compression. However, there is time when you want to share a compressed file with Windows users and you want to avoid them cursing at you. One good solution is to use zip compression (even if I had to learn how to do it on a Linux machine). Well, like always we can run man zip to learn more about it, but since you’re reading this, it is unlikely that you’re doing that....

May 22, 2023 · 1 min · 141 words · kenno

Proxmox Cannot Stop VM - Help!

I’ve been running a few VMs on Proxmox, including a Pfsense VM, for over a year without a single issue. This evening, however, I noticed that I wasn’t able to access any local DNS records due to the VM hosting DNS server was not responding. On checking the Proxmox console, I could see that that VM with ID 102 was definitely not responding. So, I tried to reboot, stop and even reset....

April 25, 2023 · 2 min · 420 words · kenno