Skip to content

Instantly share code, notes, and snippets.

View edwinclement08's full-sized avatar

Edwin Clement edwinclement08

View GitHub Profile
@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": "[email protected]",
"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;
@edwinclement08
edwinclement08 / gist:095dd43b4cbf8cb4c83ae8d67f6e928c
Created June 7, 2021 16:25 — forked from whiskerz007/gist:53c6aa5d624154bacbbc54880e1e3b2a
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
@edwinclement08
edwinclement08 / show_app.sh
Created April 30, 2021 19:12
Simple Script that can hide/focus or start an app(useful with alacritty)
#!/bin/sh
if [ $# -ne 2 ]
then
echo "Pass 2 params"
echo -e "show_app.sh <Window Title to check for> <app to open>"
echo -e "\nNotes\n\t<Window url> should be an exact string match"
echo -e "\t<app to open> should be path to the executable"
exit
fi
@edwinclement08
edwinclement08 / jtt.php
Created April 29, 2021 06:07 — forked from iansltx/jtt.php
Quick CLI for adding work log times in JIRA
#!/usr/bin/env php
<?php
if ($argc < 3) {
die("Usage: ./jtt.php ISSUE-1 30m optional comment here\n");
}
$username = 'EMAIL_GOES_HERE';
$token = 'API_KEY_HERE'; // see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
$team = 'TEAM_NAME_HERE';