Skip to content

Instantly share code, notes, and snippets.

@hyunbinseo
Last active September 5, 2025 02:16
Show Gist options
  • Save hyunbinseo/6ace7f506ac9a15791ebc290beec3d4b to your computer and use it in GitHub Desktop.
Save hyunbinseo/6ace7f506ac9a15791ebc290beec3d4b to your computer and use it in GitHub Desktop.
Frequently Used Commands
./adb devices # C:\Program Files (x86)\ClockworkMod\Universal Adb Driver
./adb shell settings put system csc_pref_camera_forced_shuttersound_key 0 # disable galaxy shutter sound
pnpm svgo -rf ./ -o ./ # https://github.com/svg/svgo#readme

open and detach multiple terminal windows

screen # Ctrl+A, then D - Detach from current session
screen -ls
screen -r [session_id]

update git commit timestamp

GIT_COMMITTER_DATE="$(date)" git commit --amend --no-edit --date "$(date)"
git commit --amend --no-edit --date="$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"

search binary files with regex

find . -type f -name "*.mp4" | grep -E "B28|K52" | grep -E "Recording_[0-9]"
Get-ChildItem -Path . -Filter *.mp4 -Recurse -File | Where-Object { $_.Name -match "B28|K52" -and $_.Name -match "Recording_\d" } | Select-Object -ExpandProperty FullName
# mount nas directory
# find paths of select files
# copy listed files to local
# convert mp4 files to audio
# send audio files with croc
# should use a non-tailscale ip
read -p "NAS IP Address: " NAS_IP
read -p "NAS Username: " USERNAME
read -s -p "NAS Password: " PASSWORD
echo
BASE_DIR=~/zoom-converted
MP4_DIR="$BASE_DIR/mp4"
AAC_DIR="$BASE_DIR/aac"
PATHS_FILE="$BASE_DIR/paths.txt"
NAS_MOUNT=~/zoom-readonly
NAS_PATH=//$NAS_IP/zoom/zoom
mkdir -p "$MP4_DIR" "$AAC_DIR" "$NAS_MOUNT"
sudo mount -t cifs "$NAS_PATH" "$NAS_MOUNT" -o username="$USERNAME",password="$PASSWORD",ro
trap 'sudo umount "$NAS_MOUNT"' EXIT
# 서현빈 (대한초)
# 홍길동 (민국초)
find "$NAS_MOUNT" -type f -name "*Recording_as_*.mp4" | grep -E "서현빈 \(대한초\)|홍길동 \(민국초\)" > "$PATHS_FILE"
cd "$BASE_DIR"
xargs -a "$PATHS_FILE" -I{} cp {} "$MP4_DIR"
cd "$MP4_DIR"
for file in *.mp4; do ffmpeg -i "$file" -vn -acodec copy "$AAC_DIR/${file%.mp4}.aac"; done
croc send "$AAC_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment