Skip to content

Instantly share code, notes, and snippets.

View tiagocesar's full-sized avatar
😎

Tiago César Oliveira tiagocesar

😎
View GitHub Profile
@tiagocesar
tiagocesar / yt_download.sh
Last active February 26, 2026 15:02
Download videos from your Watch Later playlist on YouTube
#!/bin/bash
# ==============================================================================
# Setup Instructions:
#
# 1. Dependencies:
# Install the required packages using Homebrew:
# brew install yt-dlp ffmpeg
#
# 2. Folder Structure:
@tiagocesar
tiagocesar / yt_download.sh
Created February 25, 2026 23:14
Download videos from your Watch Later playlist on YouTube
#!/bin/bash
# 1. FIX: Export the PATH so Cron can find Node.js, Python, and ffmpeg
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# Ensure we are in the correct directory so it finds the cookies.txt
cd "$(dirname "$0")"
# --- Lockfile mechanism (prevents concurrent runs) ---
LOCKDIR="$(dirname "$0")/.yt_download.lock"
@tiagocesar
tiagocesar / Brewfile
Last active May 2, 2024 08:32
Brewfile - check comments on how to install and generate
tap "cantino/mcfly"
tap "derailed/k9s"
tap "homebrew/bundle"
tap "homebrew/services"
brew "colordiff"
brew "flyctl"
brew "git"
brew "glow"
brew "helix"
brew "hey"
@tiagocesar
tiagocesar / update_go_version.sh
Last active October 23, 2023 15:43
Update Go to the latest version
# Updates Go to the latest version
update_go() {
latest_go_version=`curl -L https://go.dev/VERSION\?m\=text | cut -f3 -d ' '`
current_go_version=`go version 2>/dev/null | cut -f3 -d ' '`
if [ "$current_go_version" != "$latest_go_version" -a "$latest_go_version" != "" ]; then
echo "* Updating Go to version $latest_go_version (from $current_go_version)"
sudo sh -c "rm -fr /usr/local/go && curl -C - --silent https://dl.google.com/go/${latest_go_version}.darwin-arm64.tar.gz |tar -C /usr/local -xzf -"
fi
}
git branch | grep -v "master\|develop" | xargs git branch -D