Skip to content

Instantly share code, notes, and snippets.

View ryumada's full-sized avatar
🤔
What should I code?

Rizuki Ryumada ryumada

🤔
What should I code?
  • garasijogi
  • Indonesia
View GitHub Profile
@ryumada
ryumada / fixWSL.md
Created December 24, 2023 02:57
WSL no internet connection; WSL cannot bypass Windows Firewall; WSL internet access blocked by Windows Firewall Control (WFC)

The problem is when I enable this setting in my firewall.

image

I can't connect to internet from my WSL.

image

I have tried to allow connection to WSL using this guide microsoft/WSL#4585 (comment).

@ryumada
ryumada / prepare-debian-wsl-for-deployment.md
Last active October 5, 2024 03:57
Prepare your WSL's Debian for development.

Export, Import, and then Prepare your imported Debian Distribution

In this section, I want to copy the cleaned version of Debian distribution. I want to separate the development of my softwares. So, I will create one WSL distribution for one software project.

1. List your WSL Distributions

Look at the name of your distribution you want to export.

wsl -l -v

As you can see in this screenshot, we want to export the clean version of Debian distribution:

@ryumada
ryumada / Configuration-o21-LTSC.xml
Created March 5, 2023 13:25
Office Deployment Files; Office Configuration for Deployment.
<Configuration ID="f41ae2df-f5bf-4813-a27a-461bcd09d843">
<Add OfficeClientEdition="64" Channel="PerpetualVL2021">
<Product ID="ProPlus2021Volume" PIDKEY="FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH">
<Language ID="en-us" />
<Language ID="id-id" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="OneNote" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="Publisher" />
@ryumada
ryumada / fix-missing-grub-after-windows-install-or-update.md
Last active December 20, 2024 04:16
How to fix missing grub from Boot Menu after windows install or update

How to fix missing grub from Boot Menu after windows install or update[^1]

Boot your computer using USB Bootable Linux

Burn Linux Live CD ISO into your USB drive. then boot to it.

Then, install grub-efi-amd or grub-efi-ia32 based on your system specification.

sudo apt install grub-efi-amd
@ryumada
ryumada / fixing-grub-just-showing-command-shell.md
Last active February 11, 2024 16:11
Grub not showing the grub menu instead It just showing the minimal-bash.

Overview

The problem of grub not showing the default grub menu is because it can't read your grub.cfg file in your EFI System Partition. EFI System Partition is tagged as its name in the partition list.

This command is used to list the disk using bash:

sudo fdisk -l

example output:

@ryumada
ryumada / cloudskillboost-set_project_single_command.md
Last active November 12, 2022 04:41
Set the google project ID while doing Cloudskillboost labs in one copy-paste-enter command.

This command below will set the project ID given in Cloudskillboost Labs. The Project ID got from the project list name start with prefix "qwiklabs-gcp".

NOTE: If there are more than one projects given to you while doing the Cloudskillboost's lab, this command below will not work.

output=$(gcloud projects list | grep "PROJECT_ID: qwiklabs-gcp")
for word in $output
do
  if [ $(echo $word | grep "qwiklabs-gcp") ]
 then
@ryumada
ryumada / asynchronous_Promise.js
Created December 16, 2021 01:37
differences between synchronous and asynchronous using Promise
const AWS = require('aws-sdk');
class StorageService {
constructor() {
this._S3 = new AWS.S3();
}
writeFile(file, meta) {
const parameter = {
Bucket: process.env.AWS_BUCKET_NAME, // Nama S3 bucket yang ingin digunakan
@ryumada
ryumada / psql-basic_command.md
Last active October 2, 2023 09:51
basic psql commands cheatsheet PostgreSQL

basic psql commands for easy read

commands description
GRANT ALL PRIVILEGES ON DATABASE <<nama database>> TO <<nama user>>; Query to grant All Previledges to a user
sudo -u postgres psql Linux ubuntu login to superadmin
CREATE USER <<nama user>> WITH ENCRYPTED PASSWORD '<<password>>'; Query to create user
\l get database list in the postgres server
\c database_name connect to a database (You need to connect to a database first before you can run the below commands)
\d table_name show table details
@ryumada
ryumada / daterange_oneMonthLater.js
Last active October 25, 2021 02:45
get daterange one month javascript
const getDaterangeOneMonth = () => {
let date = new Date();
let dateLater = new Date();
dateLater.setDate(date.getDate() + 30);
return `${date.toISOString().split("T")[0]} - ${dateLater.toISOString().split("T")[0]}`;
}
console.log(getDaterangeOneMonth); // 2021-10-25 - 2021-11-24