Skip to content

Instantly share code, notes, and snippets.

View nkgentile's full-sized avatar

Noah Gentile nkgentile

View GitHub Profile
reset-deps() {
echo "🔎 Detecting package manager..."
pkg_manager=""
# Step 1: Detect from package.json
if [ -f package.json ]; then
pkg_manager=$(jq -r '.packageManager // empty' package.json 2>/dev/null | cut -d@ -f1)
if [ -n "$pkg_manager" ]; then
echo "📦 Detected package manager from package.json → $pkg_manager"
@nkgentile
nkgentile / cleanup-node-versions.sh
Created January 15, 2025 21:14
Cleanup NVM-managed Node versions
# Add to .zshrc or similar, and run `cleanup-node-versions`
cleanup-node-versions() {
echo "Starting NVM cleanup..."
# Get all installed versions and sort them
local installed=($(nvm ls | grep -o "v[0-9]\+\.[0-9]\+\.[0-9]\+" | sort -V))
# Track versions to keep
local keep=()
local current_major=""
@nkgentile
nkgentile / fillBody.sh
Last active June 18, 2023 08:51
Github CLI alias to update a PR's description
gh alias set --shell fill-body 'gh pr edit --body "$(git log --pretty=format:"- %s" --no-decorate --reverse ${1:-main}...HEAD)"'
@nkgentile
nkgentile / settings.json
Created April 14, 2023 18:10
VSCode ESLint settings
{
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
// ESLint
@nkgentile
nkgentile / SplitViewLink.tsx
Last active March 15, 2023 21:43
Duplicate the current pane, switching to provided view ID
@nkgentile
nkgentile / .tmux.conf
Last active July 30, 2025 00:25
.tmux.conf
set-window-option -g mode-keys vi
set -g @continuum-restore 'on'
# Enable titles
set-option -g set-titles on
set -g set-titles-string '#S'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
@nkgentile
nkgentile / .zshrc
Last active February 9, 2021 22:53
.zshrc
# If you come from bash you might have to change your $PATH.
export PATH="/usr/local/bin:$PATH"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes