Skip to content

Instantly share code, notes, and snippets.

View iTrauco's full-sized avatar

Christopher Trauco iTrauco

View GitHub Profile
@iTrauco
iTrauco / disable_xfce_scroll_workspace.sh
Created April 1, 2025 03:24
Script to disable scroll-based workspace switching in XFCE
#!/bin/bash
# πŸ”§ Disables scroll-based workspace switching in XFCE
# πŸ“‚ Backs up current settings to ~/.xfce-backups/pre_scroll_disable.txt
mkdir -p ~/.xfce-backups
xfconf-query -c xfwm4 -lv | grep -E "scroll|rollup" > ~/.xfce-backups/pre_scroll_disable.txt
# Disable scroll workspace switching and title bar rollup
xfconf-query -c xfwm4 -p /general/scroll_workspaces -s false
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
alias gistedit='function _gistedit(){ vim "$1"; local filename="$1"; gh gist create "$filename" --public; }; _gistedit'
alias gisteditdesc='function _gisteditdesc(){
local filename="$1";
if [ -z "$filename" ]; then
echo "Usage: gisteditdesc <filename>";
return 1;
fi;
#!/bin/bash
# Install xbindkeys
echo "Installing xbindkeys..."
sudo apt update && sudo apt install xbindkeys -y
# Create the default configuration file
echo "Creating xbindkeys configuration file..."
xbindkeys --defaults > ~/.xbindkeysrc
#!/bin/bash
# πŸŽ₯ Peek Launcher Script
# πŸ› οΈ Usage:
# 1️⃣ Install dependencies: `sudo apt install peek xdotool x11-utils`
# 2️⃣ Save this script as `peek_at_cursor.sh` and make it executable.
# Example: `chmod +x ~/scripts/peek_at_cursor.sh`
# 3️⃣ Run the script: `~/scripts/peek_at_cursor.sh`
# 4️⃣ Peek will open at your cursor's position and stay open for multiple recordings.

Code Interaction Guidelines

Code Preservation

  • Maintain all existing comments and emojis in uploaded project code
  • Preserve file structure and documentation style
  • Keep existing formatting patterns

Code Modification Output Format

For each code change:

  1. File path must be shown:
# Today only (since midnight UTC)
resource.type="cloud_function"
resource.labels.function_name="your_function_name"
timestamp >= timestamp_trunc(current_timestamp(), DAY, "UTC")
(
textPayload=~"ERROR"
OR textPayload:~"Checking if blob exists"
OR textPayload:~"Attempting to download blob"
OR textPayload:~"Starting workbook preprocessing"
OR textPayload:~"SOURCE_PROCESSING_ERROR"

Downloading Music Playlists from YouTube

Disclaimer

Use this knowledge at your own risk.

youtube-dl for Windows

youtube-dl will allow you to download entire youtube playlists and store them as MP3s. This will also allow you to download individual MP3s.

Prompt:

"I am working on a new Git project, and I need a clear feature map for branch naming conventions. The feature map should outline each development phase, the corresponding tasks, and suggested branch naming conventions for each step.

Here are the requirements:

Provide a list of development phases (initial setup, core logic, testing, continuous integration, additional features, linting/formatting, documentation, code review, release, and post-release maintenance). For each phase, describe the objective and the key tasks that need to be completed. For each phase, suggest a branch naming convention following this structure: feat/feature-description, fix/bug-description, release/version, etc. Ensure each phase follows this format:

Project: Data Normalization and BigQuery Integration for Gaming Compliance

Context: I am developing a cloud-based system for normalizing and processing gaming compliance data from various operators, specifically starting with RSI BetRivers. The system needs to handle Excel file inputs, process them according to a predefined schema, and output the normalized data to BigQuery tables.

Key Components:

  1. Cloud Function: Triggered by file uploads to a Google Cloud Storage bucket.
  2. Data Processing: Normalizing Excel data based on a JSON schema.
  3. BigQuery Integration: Loading processed data into specified BigQuery tables.

Prompt for Future Sessions

Please ensure the following behavior in all future sessions:

  1. Output a single code block at a time: Provide the path to the file and use an echo command to modify the code directly from the terminal.
  2. Include sed commands: Provide sed commands to remove, modify, or change old code if necessary.
  3. Summarize next steps: Before proceeding, summarize the next steps and seek user approval.

Example