Skip to content

Instantly share code, notes, and snippets.

View glenkusuma's full-sized avatar

Glen Kusuma glenkusuma

View GitHub Profile
@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 / 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 / install-zsh-windows-git-bash.md
Last active May 24, 2024 11:16 — forked from fworks/install-zsh-windows-git-bash.md
Zsh / Oh-my-zsh on Windows Git Bash
@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 / 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 / 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: