Skip to content

Instantly share code, notes, and snippets.

View sombraguerrero's full-sized avatar

Robert Setter sombraguerrero

  • Minneapolis, MN
View GitHub Profile
@sombraguerrero
sombraguerrero / icon_encoder.ps1
Created January 26, 2026 22:35
Icon Encoder (Windows)
<#
.SYNOPSIS
Convert a bitmap (BMP/PNG/JPG etc.) into a valid .ico file with proper ICO headers.
.DESCRIPTION
Builds a correct ICO structure:
- ICONDIR (6 bytes)
- N x ICONDIRENTRY (16 bytes each)
- Image blobs, each consisting of:
@sombraguerrero
sombraguerrero / ffmpeg_hls.ps1
Last active January 18, 2026 06:59
Powershell for FFMPEG HLS
# This is a PowerShell script designed to be used with FFMPEG to encode videos for hls.
# The duration calculation for .mov files is intended to account for videos recorded via iOS whose timelines
# seem to have a large, continuous block of frames at the beginning whose PTS values are unusable for segmentation
sl $PSScriptRoot
$myMovie = Read-Host -Prompt 'Path to movie: '
$ext = (Get-Item $myMovie).Extension.ToLower()
$isMov = $ext -eq ".mov"
@sombraguerrero
sombraguerrero / installing-cpp-on-windows.md
Last active December 19, 2025 10:44 — forked from ahmednawazkhan/installing-cpp-on-windows.md
Install C++/Mingw-w64/g++ on windows

Installing C++/g++/Mingw-w64 on Windows

  1. Install Msys2 from msys2.org
  2. Complete the steps and open Msys2
  3. Update package databases pacman -Syu
  4. Update rest of base packages pacman -Su
  5. Using UCRT64 as the recommended environment, install Mingw-w64 pacman -S $MINGW_PACKAGE_PREFIX-{toolchain,ntldd}
WIFI:T:<encryption>;S:<SSID>;P:<password>;H:<hidden>;;
function generateGUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
}
sudo update-locale LANG="en_US.UTF-8" LC_TIME="en_IE.UTF-8
83, 97, 108, 116, 101, 100, 95, 95
0x53, 0x61, 0x6C, 0x74, 0x65, 0x64, 0x5F, 0x5F
U2FsdGVkX18=
openssl enc -d -aes-256-cbc -md md5 -a -in <(echo "gcnum")
@sombraguerrero
sombraguerrero / tsql_join.txt
Created October 28, 2023 08:41
T-SQL Optimization Note
Joins in T-SQL are optimized such that one table is loaded into memory while the other is dumped to disk.
<!--
You can create a shortcut with a CLSID key (GUID) by adding either command below in front of the CLSID key (GUID).
Sometimes the shortcut will only work using one and not the other command below.
For example:
explorer shell:::{CLSID key}
OR
@sombraguerrero
sombraguerrero / ruffle_desktop_linux
Last active March 10, 2024 05:09
Dependencies to build Ruffle desktop on Ubuntu:
Dependencies to build Ruffle desktop on Ubuntu:
* libasound2-dev
* libxcb-shape0-dev
* libxcb-xfixes0-dev
* libgtk-3-dev *libssl-dev
* libxcb-xinput-dev
* libxcb-xkb-dev
* libxcb-cursor-dev*
* default-jre-headless
* cmake