Skip to content

Instantly share code, notes, and snippets.

View ryanmoralesaz's full-sized avatar

Ryan Morales ryanmoralesaz

View GitHub Profile
@ryanmoralesaz
ryanmoralesaz / cleanbackup $PROFILE
Created October 24, 2025 04:17
Clean all dev stuff before backing up to gDrive
function cleanbackup {
Write-Host "Cleaning up for backup..." -ForegroundColor Yellow
# node_modules
Write-Host "Removing node_modules..." -ForegroundColor Red
Get-ChildItem -Path . -Filter "node_modules" -Recurse -Directory -Force | Remove-Item -Recurse -Force
# .git folders (since code is on GitHub)
Write-Host "Removing .git folders..." -ForegroundColor Red
Get-ChildItem -Path . -Filter ".git" -Recurse -Directory -Force -Hidden | Remove-Item -Recurse -Force
@ryanmoralesaz
ryanmoralesaz / cleanmodules$PROFILE
Created October 24, 2025 04:09
Clean node modules in current folder Windows Powershell $PROFILE
function cleanmodules {
Write-Host "Searching for node_modules folders..." -ForegroundColor Yellow
$folders = Get-ChildItem -Path . -Filter "node_modules" -Recurse -Directory
if ($folders.Count -eq 0) {
Write-Host "No node_modules folders found." -ForegroundColor Green
return
}
Write-Host "Found $($folders.Count) node_modules folder(s). Deleting..." -ForegroundColor Red
@ryanmoralesaz
ryanmoralesaz / .gitconfig
Last active October 24, 2025 05:05
git config
[user]
name = git
email = your_preferred@email.email
[alias]
ac = "!git add . && git commit -m"
pom = push origin main
lom = pull origin main
rao = remote add origin
lomauh = pull origin main --allow-unrelated-histories