Skip to content

Instantly share code, notes, and snippets.

View fathulfahmy's full-sized avatar

Fathul Fahmy fathulfahmy

View GitHub Profile

How to Set Windows 11 Right-click Show More Options as Default Behavior

  1. Run Command Prompt as Administrator
  2. Copy and paste
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
  1. Press enter
  2. Reboot
function hideNavbar() {
if (window.innerWidth >= 1024) {
console.log("desktop");
var prevScrollpos = window.scrollY;
window.onscroll = function () {
var currentScrollPos = window.scrollY;
if (prevScrollpos > currentScrollPos) {
navbar.style.top = "0";
@fathulfahmy
fathulfahmy / preview-image.js
Last active July 6, 2024 09:41
file input image preview
function previewImage() {
const dropZone = document.getElementById("drop-zone");
const fileInput = document.getElementById("file-input");
const img = document.getElementById("preview-image");
let p = document.getElementById("drop-text");
if (fileInput) {
fileInput.addEventListener("change", function () {
const clickFile = this.files[0];
if (clickFile) {
@fathulfahmy
fathulfahmy / lenovo-conservation-mode.md
Created July 29, 2023 01:46
Lenovo/Legion Conservation Mode
  1. Run terminal
  2. Execute echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode
  3. Set 1 to ON or 0 to OFF
@fathulfahmy
fathulfahmy / fedora-update-grub.md
Last active July 11, 2023 15:58
Fedora update grub command not found

Prerequisites:

sudo dnf install shim os-prober efibootmgr grub2 grub2-efi

Method 1: Use command to update grub

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
@fathulfahmy
fathulfahmy / fedora-davinci-resolve.md
Last active July 11, 2023 15:58
Fedora Davinci Resolve 18 launch issue

error:
./resolve: symbol lookup error: /lib64/libpango-1.0.so.0: undefined symbol: g_string_free_and_steal

fix:

cd
sudo cp /lib64/libglib-2.0.* /opt/resolve/libs/
cd /opt/resolve/bin/
sudo ./resolve
@fathulfahmy
fathulfahmy / crkbd-programming-keyboard.md
Last active July 11, 2023 15:53
40 keys split keyboard layout made with programming in mind

Example 1:

image image image

Example 2:

layout0 layout1 layout2

@fathulfahmy
fathulfahmy / xfce-i3-guide.md
Created June 30, 2023 18:29
A guide on how to setup XFCE with i3wm

How to XFCE with i3WM

Download

  1. Download XFCE Distribution
  2. Download i3 only (i3 status i3 lock dmenu is not needed)

⚠️ Do not installed preconfigured or distributed i3wm to avoid conflicts with XFCE settings
e.g.
do sudo dnf install i3 --setopt=install_weak_deps=False
dont "i3 desktop" or @i3-desktop-environment