Skip to content

Instantly share code, notes, and snippets.

View edwinclement08's full-sized avatar

Edwin Clement edwinclement08

View GitHub Profile
@edwinclement08
edwinclement08 / btrfs-check.log
Created March 28, 2026 10:50
Btrfs check readonly result
This file has been truncated, but you can view the full file.
[1/8] checking log skipped (none written)
[2/8] checking root items
[3/8] checking extents
parent transid verify failed on 1761043709952 wanted 104398 found 104397
parent transid verify failed on 1761043709952 wanted 104398 found 104397
parent transid verify failed on 1761043709952 wanted 104398 found 104397
Ignoring transid failure
parent transid verify failed on 1761043628032 wanted 104398 found 104397
parent transid verify failed on 1761043628032 wanted 104398 found 104397
parent transid verify failed on 1761043628032 wanted 104398 found 104397
[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@edwinclement08
edwinclement08 / monitor_swap.ps1
Created December 26, 2025 11:28
Swapping Monitor horizontal orientation for Win11(2 side by side monitors usecase).
param(
[switch]$DryRun,
[switch]$UseUnicode,
[switch]$Apply
)
# Usage:
# powershell -NoProfile -ExecutionPolicy Bypass -File "monitor_swap.ps1" -Apply
@edwinclement08
edwinclement08 / pair-dual-boot-bluetooth.md
Created September 10, 2023 04:22 — forked from madkoding/pair-dual-boot-bluetooth.md
Pairing bluetooth devices (keyboard or mouse) in dual boot with Linux Ubuntu and Windows 10

1) Pair ALL bluetooth devices in linux (it is to have the files you will need to edit later)

2) Pair ALL bluetooth devices in Windows 10. If you know how, get the MAC address id from your bluethooth keyboard, we will need it later

3) Reboot and go back to Linux

4) Install chntpw package, this is needed to read the registry keys from Wintendo

sudo apt-get install chntpw
@edwinclement08
edwinclement08 / windows-alt-tab-snappy.txt
Created October 2, 2022 17:20
Bring back the old Alt tab for windows
Create a DWORD called "AltTabSettings" in
\HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer
and set it to 1.
This will get you back your beloved classic (and super zippy) Windows XP AltTab.
@edwinclement08
edwinclement08 / resume.json
Last active January 26, 2022 15:26
Resume based on jsonresume.org
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Edwin Clement",
"label": "Software Engineer at BrowserStack",
"email": "edwinclement08@gmail.com",
"phone": "+91 98335 82185",
"url": "https://blog.edwinclement08.com",
"summary": "An avid learner interested in various domains. Primarily skilled in Python, Deep Learning, App Development and Full Stack Apps. ",
"location": {
@edwinclement08
edwinclement08 / toggle caps lock.sh
Created January 26, 2022 10:39
How to Programmatically type Caps Locks to toggle it on linux
# To install on Arch-based distros(like Manjaro)
# sudo pacman -Syu xdotool
# To install on Ubuntu-based distros
# sudo apt-get install xdotool
xdotool key Caps_Lock
# Especially useful in VM scenarios where the parent OS has disabled Caps Lock,
# but somehow the child OS thinks that caps is active.
@edwinclement08
edwinclement08 / node-server-get-client-ip.js
Created October 14, 2021 14:38
node-server-get-client-ip.js
var http = require('http');
var server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello ' + req.connection.remoteAddress + '!');
// Client address in request -----^
});
server.on('connection', function(sock) {
console.log('Client connected from ' + sock.remoteAddress);
// Client address at time of connection ----^
});

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@edwinclement08
edwinclement08 / lsiommu
Created June 12, 2021 10:11 — forked from flungo/lsiommu
List the devices and their IOMMU groups.
#!/bin/bash
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;