Skip to content

Instantly share code, notes, and snippets.

@weyh
weyh / init.lua
Last active April 9, 2025 05:29
Nvim cfg
-- Set <space> as the leader key
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Install package manager
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g mouse on
@weyh
weyh / config.lua
Last active April 9, 2025 05:31
My LunarVim config
-- Read the docs: https://www.lunarvim.org/docs/configuration
-- Example configs: https://github.com/LunarVim/starter.lvim
local first_start_marker = vim.fn.stdpath("data") .. "/first_start_completed"
-- general
lvim.log.level = "warn"
lvim.format_on_save = true
lvim.colorscheme = "onedarker"
-- vim.opt.mouse = ""
-- to disable icons and use a minimalist setup, uncomment the following
@weyh
weyh / .bashrc
Last active August 15, 2023 07:09
PS1="\[\e[0;35m\]\u\[\e[1;36m\]\[\033[m\]@\[\e[1;36m\]\h\[\033[m\]:\[\e[0m\]\[\e[1;32m\][\w]> \[\e[0m\]"
if [[ -n "$IS_WSL" || -n "$WSL_DISTRO_NAME" ]]; then
alias ii="explorer.exe"
alias iil="explorer.exe ."
fi
complete -W "\`grep -oE '^[a-zA-Z0-9_.-]+:([^=]|$)' ?akefile | sed 's/[^a-zA-Z0-9_.-]*$//'\`" make
alias valgrind_quick="valgrind --tool=memcheck --leak-check=yes"
@weyh
weyh / remove-skype-from-context-menu.ps1
Last active December 19, 2020 13:12
Removes Skype from Context Menu
$og = $pwd
foreach ($item in Get-ChildItem "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\Package") {
if ($item -like "*Skype*") {
Set-Location $item.PSPath
Set-ItemProperty "Class\{776DBC8D-7347-478C-8D71-791E12EF49D8}" -Name "DllPath" -Value "-Skype\SkypeContext.dll"
}
}
@weyh
weyh / .vimrc
Last active February 6, 2022 13:46
My .vimrc
" -- Plugins --
" First Start
let firstStart = 0
if !filereadable(expand('~/.vim/bundle/Vundle.vim/README.md'))
echo "Setting up Vundle.vim!\nPlease ignore errors!\n"
silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
let firstStart = 1
endif
@weyh
weyh / VA.ahk
Created September 1, 2020 14:17
; Src: https://autohotkey.com/board/topic/21984-vista-audio-control-functions/
; VA v2.3
; MASTER CONTROLS
VA_GetMasterVolume(channel="", device_desc="playback")
{
if ! aev := VA_GetAudioEndpointVolume(device_desc)
return
if channel =
VA_IAudioEndpointVolume_GetMasterVolumeLevelScalar(aev, vol)