Skip to content

Instantly share code, notes, and snippets.

View glenkusuma's full-sized avatar

Glen Kusuma glenkusuma

View GitHub Profile
@glenkusuma
glenkusuma / permutasi-dan-kombinasi.md
Last active April 7, 2022 07:12 — forked from andrijunaedi/permutasi-dan-kombinasi.md
Permutasi dan Menghitung Kombinasi

Permutasi & Minghitung Kombinasi

Creator

Soal

Tentukan jumlah susunan yang akan diperoleh, jika hendak menghabiskan uang sejumlah $100 untuk tepat membeli 100 ayam, kriteria jenis ayam dan harganya ditentukan berikut:

@glenkusuma
glenkusuma / LKG.py
Created October 23, 2022 08:16
Lipat Kertas Gambar GemasTIK XIV (2021)
# Lipat Kertas Gambar GemasTIK XIV (2021)
# ini adalah fungsi untuk menghitung jumlah lipatan kertas gambar
def lkg(N,jumlahKertas):
i = 1
while i <= jumlahKertas:
n = N[i-1]
m = n[2]
j = 1
# melipat sisi kertas yang paling besar
while j <= m:
@glenkusuma
glenkusuma / igracias_edom.js
Last active June 3, 2024 16:54
igrasias edom script - feelin lazy pressin all the input form in igracias edom? just copy and paste this javascript into your dev tool console! let the javascript magic do it's thing and voilà✨
// igrasias edom script version 03/06/24
// Constants for the labels
const SATISFIED_LABELS = new Set(["Ya", "Sangat puas"]);
// Function to click radio buttons based on labels
const clickRadioButtons = () => {
const optElements = document.getElementsByClassName("opt");
Array.from(optElements).forEach(optElement => {
const label = optElement.parentElement.nextElementSibling.innerText;
@glenkusuma
glenkusuma / install-zsh-windows-git-bash.md
Last active October 31, 2024 12:54 — forked from fworks/install-zsh-windows-git-bash.md
Zsh / Oh-my-zsh on Windows Git Bash
@glenkusuma
glenkusuma / dwm_config_pulseaudio.h
Created June 19, 2024 15:52 — forked from palopezv/dwm_config_pulseaudio.h
dwm volume control with hardware multimedia keys (pipewire, pulseaudio, amixer and light as an extra)
/**
* dwmconfig.h
* Hardware multimedia keys
*/
/* Somewhere at the beginning of config.h include: */
/*
You obviously need the X11 development packages installed, X11proto in particular, but
here is the location of the keysyms header upstream copy if you can't bother
using the contents of your own hard drive. ;-P
@glenkusuma
glenkusuma / timeshift-archlinux-fix.md
Created June 19, 2024 16:01 — forked from ovelny/timeshift-archlinux-fix.md
Fix for scheduled backups with Timeshift and Arch Linux

Issue

If you installed Timeshift from the AUR package (https://aur.archlinux.org/packages/timeshift/), you'll find that scheduled backups may not work. This is due to cronie being disabled by default.

Fix

Check if cronie is present first:

systemctl list-unit-files | grep cronie
@glenkusuma
glenkusuma / install-arch.md
Created August 27, 2024 09:22 — forked from mjnaderi/install-arch.md
Installing Arch Linux with Full Disk Encryption (LVM on LUKS)

Installing Arch Linux with Full Disk Encryption

If you're aiming for a seamless Arch Linux installation in UEFI mode, follow along as this guide will walk you through the process step by step. We'll be using LUKS (Linux Unified Key Setup) and LVM (Logical Volume Manager) partitions on LUKS to achieve full disk encryption.

Note: I have updated this doc for UEFI mode. For those with BIOS/MBR systems, you can refer to the previous version, but keep in mind that it might be outdated and no longer accurate.

If you're only interested in installing Linux and not setting up dual boot with Windows, feel free to skip the Windows-related sections.