Skip to content

Instantly share code, notes, and snippets.

View ryanmoralesaz's full-sized avatar

Ryan Morales ryanmoralesaz

View GitHub Profile
@ryanmoralesaz
ryanmoralesaz / goto
Last active January 28, 2026 03:00
my zshrc with goto function and php repl
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
@ryanmoralesaz
ryanmoralesaz / NOTES.txt
Created January 9, 2026 00:29
NOTES HOW TO START VBOX INSTANCE with DESKTOP SHORTCUT
How to create a desktop shortcut to start vbox
# Make sure you have this in your $profile
$env:PATH += ";C:\Program Files\Oracle\VirtualBox"
# get the name of your instance by running
`vboxmanage list vms`
# Put the below script in a folder in your documents (call it "start-linux-server.ps1"
@ryanmoralesaz
ryanmoralesaz / .tmux.conf
Created December 25, 2025 03:07
tmux config for osc 52 copying
# Vim-style pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Vim-style pane resizing (-r allows repeat without prefix)
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
@ryanmoralesaz
ryanmoralesaz / install-default-packages.sh
Last active December 25, 2025 01:07
ubuntu-dev-learning-server-install-script
#!/bin/bash
# Complete installation script for teaching server
set -e # Exit on any error
echo "=== Checking disk usage BEFORE installation ==="
df -h / | grep -v Filesystem
du -sh /usr /var /home 2>/dev/null || true
echo ""
@ryanmoralesaz
ryanmoralesaz / crosshighlightappscript.txt
Created November 3, 2025 18:16
Cross highilight google apps script
/**
* OPTIMIZED Cross-Highlighting - No Lag Version
* Only highlights cells within your actual data range
*/
function onSelectionChange(e) {
var ss = e.source;
var sheet = ss.getActiveSheet();
var activeCell = ss.getActiveRange();
@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 / scancodes.txt
Created August 8, 2025 16:50
All ANSI keyboard Scan Codes for AHK
<!-- # AutoHotkey Scan Codes Reference Table -->
## Letter Keys
| Key | Scan Code | Key | Scan Code | Key | Scan Code |
| --- | --------- | --- | --------- | --- | --------- |
| A | SC01E | J | SC024 | S | SC01F |
| B | SC030 | K | SC025 | T | SC014 |
| C | SC02E | L | SC026 | U | SC016 |
| D | SC020 | M | SC032 | V | SC02F |
@ryanmoralesaz
ryanmoralesaz / global-cursor-move.ahk
Created July 17, 2025 22:57
Global Cursor Move Helper AHK script
#Requires AutoHotkey v2.0
#SingleInstance Force
#Warn
; Global variable for grid navigation - single position tracker
global gridPosition := 1
; Helper function to move mouse to grid position
MoveToGridPosition(position) {
; Get the monitor where the mouse currently is
@ryanmoralesaz
ryanmoralesaz / list-project-folders.ps
Created June 6, 2025 17:01
A powershell script to list all folders in a project tree excluding node modules, build and dist
Get-ChildItem -Recurse | Where-Object { $_.FullName -notmatch "node_modules|\.git|dist|build" } | Sort-Object FullName | ForEach-Object {
$indent = " " * (($_.FullName.Split('\').Count) - ($PWD.Path.Split('\').Count) - 1)
$name = if ($_.PSIsContainer) { $_.Name + "/" } else { $_.Name }
"$indent$name"
}