Skip to content

Instantly share code, notes, and snippets.

View sharunkumar's full-sized avatar
💻
Working on new projects

Sharun sharunkumar

💻
Working on new projects
View GitHub Profile
@sharunkumar
sharunkumar / settings.json
Created March 3, 2025 19:40
VSCode better Ayu Dark
{
"editor.tokenColorCustomizations": {
"[Ayu Dark]": {
"textMateRules": [
{
"scope": [
"support.class.component.tsx",
],
"settings": {
"foreground": "#d65656",
@sharunkumar
sharunkumar / wsl_disable_sudo_password.sh
Last active November 12, 2024 19:39
Disable password prompt for your user on WSL (Ubuntu)
#!/bin/bash
# Check if the script is run with sudo privileges
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root. Please use sudo."
exit 1
fi
# Get the username of the person who invoked sudo
USER=$SUDO_USER
@sharunkumar
sharunkumar / Powershell-Zoxide-Import-History.ps1
Last active October 26, 2024 19:03
Import existing powershell cd history into zoxide (Linux)
cat ~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt | grep '^cd' | sed 's/^cd //' | sort | uniq | % { zoxide add $_ }
@sharunkumar
sharunkumar / nvidia-hibernate-enable.sh
Last active October 21, 2024 03:28
Services for enabling hibernation on Nvidia Laptop
# source: https://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies" /f
reg delete "HKCU\Software\Microsoft\WindowsSelfHost" /f
reg delete "HKCU\Software\Policies" /f
reg delete "HKLM\Software\Microsoft\Policies" /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies" /f
@sharunkumar
sharunkumar / config.toml
Created June 9, 2024 00:55
Helix Config
theme = "ayu_dark"
[editor]
true-color = true
[editor.statusline]
separator = " "
mode.normal = "🧬"
mode.insert = "📝"
mode.select = "🖍️"
@sharunkumar
sharunkumar / Profile.ps1
Last active February 3, 2024 08:08
PowerShell Profile with Autocomplete and Starship
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView
Set-PSReadlineKeyHandler -Key Tab -Function TabCompleteNext
# Install-Module -Name CompletionPredictor -Repository PSGallery
Import-Module -Name CompletionPredictor
Invoke-Expression (&starship init powershell)
@sharunkumar
sharunkumar / merge-release.sh
Created October 16, 2023 04:28
Merge the latest tag from upstream
merge-release() {
git pull --all
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
git merge $TAG -m "Merge Release $TAG"
}
@sharunkumar
sharunkumar / Prisma.code-snippets
Last active October 11, 2023 00:14
Prisma Snippets
{
"Integer ID": {
"scope": "prisma",
"prefix": "id",
"body": [
"$1_id Int @id @default(autoincrement())",
"$0"
],
"description": "Integer ID"
}
@sharunkumar
sharunkumar / BuggyMouse.ahk
Last active June 15, 2023 20:42
Buggy Mouse Autohotkey Script
; Source: https://superuser.com/questions/207731/configure-debounce-time-in-windows-for-mouse
/*
** Buggy-Mouse.ahk - Fix a buggy mouse. Stop it from double-clicking when you try to single-click.
**
** NOTE: Please use this URL when linking to Buggy Mouse: r.secsrv.net/AutoHotkey/Scripts/Buggy-Mouse
**
** Updated: Thu, Nov 1, 2012 --- 11/1/12, 10:19:19am EDT
** Location: r.secsrv.net/AutoHotkey/Scripts/Buggy-Mouse
**