Skip to content

Instantly share code, notes, and snippets.

View yunho-c's full-sized avatar
πŸ‘‹

Yunho Cho yunho-c

πŸ‘‹
View GitHub Profile
@yunho-c
yunho-c / remove_ds_store.sh
Created July 16, 2025 13:49
Remove .DS_Store from current directory and all subdirectories
find . -name ".DS_Store" -delete -print
@yunho-c
yunho-c / ffmpeg-cheatsheet.md
Created July 12, 2025 22:10 — forked from nickkraakman/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360ΒΊ video

Brought to you by Headjack

Β 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

Β 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file

Github to Discord Webhook Tutorial

In this tutorial I'll show you how to create a Github webhook that will post updates from your Github account to a channel in Discord. The steps are simple so follow along!

Create a Webhook in a Discord Channel

First you need to create a webhook in a text channel. We're assuming you have both Manage Channel and Manage Webhooks permissions!

  • Go in a channel properties (Alternatively, Server Settings, Webhooks works too)
@yunho-c
yunho-c / sync_jupyter.py
Created June 7, 2025 16:54
Sync `.ipynb` and `.py` files based on last modified time
"""
A script to synchronize Jupyter notebooks (.ipynb) and Python scripts (.py).
This script scans a specified directory for pairs of .py and .ipynb files
with the same base name. It then compares their last modification times
and copies the newer onto the older using `jupytext`.
This is useful for those who prefer to track Jupyter Notebooks in .py files.
Usage:
@yunho-c
yunho-c / Count lines in Git repo
Created June 6, 2025 01:06 — forked from mandiwise/Count lines in Git repo
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@yunho-c
yunho-c / languages.json
Last active June 3, 2025 21:25
A JSON file of major languages with country mappings and names
{
"none": {
"english_name": "",
"native_name": "",
"countries": []
},
"aa": {
"english_name": "Afar",
"native_name": "Qafar af",
"countries": [
@yunho-c
yunho-c / make_white_pixels_transparent.py
Created April 20, 2025 23:02
Python script to make white pixels transparent
import sys
import argparse
from PIL import Image
import numpy as np
def add_transparency(input_path, output_path, threshold=240):
"""
Add alpha channel to an image based on brightness threshold.
Makes pixels with brightness >= threshold transparent.
@yunho-c
yunho-c / compare_huggingface_models.py
Created April 17, 2025 00:34
Compare (diff) two HuggingFace Transformer Models (specifically: SpatialLM vs. base)
"""
Base Models (w/ sizes):
meta-llama/Llama-3.2-1B
Qwen/Qwen2.5-0.5B
SpatialLM Models:
manycore-research/SpatialLM-Llama-1B
manycore-research/SpatialLM-Qwen-0.5B
Commands:
@yunho-c
yunho-c / nvidia_vram_usage_by_user.sh
Created April 9, 2025 22:49
nvidia_vram_usage_by_user.sh
#!/bin/bash
# Shows which processes & users are consuming GPU memory for Nvidia GPUs.
echo "User, PID, Used Memory, GPU ID"
# Get the GPU processes information
nvidia-smi --query-compute-apps=pid,used_memory,gpu_bus_id --format=csv,noheader | while read line
do
# Extract PID from the line - use cut instead of awk for CSV format
@yunho-c
yunho-c / global-protect.sh
Created April 9, 2025 18:28 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)