Skip to content

Instantly share code, notes, and snippets.

View sumonst21's full-sized avatar
💭
Starred for hope, forked for later

Md. Sumon Islam sumonst21

💭
Starred for hope, forked for later
View GitHub Profile
@sumonst21
sumonst21 / reset_rmi_drivers__touchpad-reload.sh
Created March 13, 2026 21:35
Reset RMI4 Driver - Ubuntu Desktop Touchpad. On Ubuntu 22.04, this fails to re-initialize after the screen blanks or the laptop suspends.
sudo modprobe -r rmi_smbus && sudo modprobe rmi_smbus
sudo modprobe -r hid_rmi && sudo modprobe hid_rmi
@sumonst21
sumonst21 / tmux-copy-to-file-using-ctrl-space.md
Created June 8, 2025 22:55
tmux copy-mode to file (Termius on Windows, Debian server)

tmux copy-mode to file (Termius on Windows, Debian server)

If you can’t visually highlight with plain Space (Termius sends Ctrl+Space), and want to save tmux copy-mode selection to a file, do this:


Setup inside tmux:

  1. Press Ctrl+b then :
  2. Paste these lines one by one, pressing Enter after each:
104.28.37.12/32
104.28.37.13/32
104.28.37.14/32
104.28.37.15/32
104.28.37.16/32
104.28.43.4/32
104.28.43.5/32
104.28.43.6/32
104.28.43.7/32
104.28.43.8/32
@sumonst21
sumonst21 / Retrieve_Firmware_Embedded_Windows_Key.md
Created October 28, 2024 19:15
How to Retrieve Your Firmware-Embedded Windows Activation Key Using PowerShell

Steps to Retrieve the Firmware-Embedded Windows Activation Key

  1. Open an Elevated PowerShell Prompt

    • Search for "PowerShell" in the Start menu.
    • Right-click on "Windows PowerShell" and select Run as Administrator.
  2. Run the Command

    • In the elevated PowerShell window, enter:

(Get-CimInstance -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

@sumonst21
sumonst21 / render-build.sh
Created September 20, 2024 14:40 — forked from BigAlRender/render-build.sh
Install Chrome on Render Native Environment
#!/usr/bin/env bash
# exit on error
set -o errexit
STORAGE_DIR=/opt/render/project/.render
if [[ ! -d $STORAGE_DIR/chrome ]]; then
echo "...Downloading Chrome"
mkdir -p $STORAGE_DIR/chrome
cd $STORAGE_DIR/chrome
@sumonst21
sumonst21 / download-old-chrome-versions.md
Created March 17, 2024 21:20 — forked from barbietunnie/download-old-chrome-versions.md
How to download old versions of Chrome

How to download old versions of Chrome

Click here to download old versions of Chrome for Linux, Mac and Windows.

The download_url field of the desired section houses the URL to the download.

Alternatively, for not too old versions, you can get it directly here.

@sumonst21
sumonst21 / Windows 10 services.md
Created December 18, 2023 16:53 — forked from Aldaviva/Windows 10 & 11 services.md
Safety of disabling services in Windows 10

These settings apply to a normal, functioning Windows 10 Pro desktop with

  • wired Ethernet
  • Bluetooth
  • IPv6
  • no Wi-Fi
  • no touch screen

Safe to disable

|Display Name|Name|Notes|

@sumonst21
sumonst21 / php-quotes-and-concatenation-style-rules-for-highest-code-performance.md
Created October 5, 2023 10:06
PHP quotes and concatenation style rules for "highest code performance"

PHP quotes and concatenation style rules for "highest code performance"

The problem

PHP has many ways to concatenate strings, and many ways to expand variables inside strings. But which is the fastest?

The solution

CREATE TABLE "cards" (
"id" serial,
"card_type" varchar(20),
"card_fee" money,
PRIMARY KEY ("id")
);
CREATE TABLE "personalizations" (
"id" serial,
"font" varchar(15),
@sumonst21
sumonst21 / gist:8d3187468aad72cf8816e00306af3720
Created August 2, 2023 06:38
mod_rewrite - htaccess redirect http to https
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>