Skip to content

Instantly share code, notes, and snippets.

View Subilan's full-sized avatar
🎯
Focusing

oceanblue Subilan

🎯
Focusing
View GitHub Profile
@unixzii
unixzii / ContentView.swift
Last active March 30, 2024 08:36
GPU particle system using Metal.
import SwiftUI
struct SmashableView: NSViewRepresentable {
typealias NSViewType = _SmashableNSView
let text: String
class _SmashableNSView: NSView {
@SizableShrimp
SizableShrimp / README.md
Last active January 8, 2026 14:50
How to setup shading with Minecraft Forge

How to setup shading with Minecraft Forge

Shading is the concept of packing external dependencies inside your jar so that they exist in production. Without this, using external libraries would produce ClassNotFoundExceptions when you run your mod jar outside of an IDE. This guide explains how to setup shading through Gradle.

Assumptions

This guide assumes that:

  • You are on ForgeGradle 5 or higher
  • You are on Gradle 7.0 or higher
@marcgeld
marcgeld / psRandomAlphaNumeric.ps1
Created April 5, 2017 13:05
Powershell: Generate a random Alphanumeric string
# Generate a random Alphanumeric string
Function Get-RandomAlphanumericString {
[CmdletBinding()]
Param (
[int] $length = 8
)
Begin{
@Martmists-GH
Martmists-GH / portal_sorted.py
Last active February 9, 2026 13:05
Portal voice lines sorted by character
announcer = """
Announcer: Explosion imminent. Evacuate the facility immediately.
Announcer: Warning. Reactor core is at critical temperature.
Announcer: Warning: Core overheating. Nuclear meltdown imminent.
Announcer: Warning: Core corruption at 50 percent.
Announcer: Warning: Core corruption at 75 percent.
Announcer: Warning: Core corruption at 100 percent.
Announcer: Neurotoxin level at capacity in five minutes.
Announcer: Vent system compromised: Neurotoxin offline.
Announcer: Reactor explosion in four minutes.
@mlen
mlen / flac2alac
Last active April 8, 2025 16:40
FLAC to ALAC converter. Requires Mac OS X and `flac` binary installed (ie. via Homebrew: `brew install flac`).
#!/usr/bin/env bash
set -e
convert_to_alac() {
flac="$1"
aiff="${flac%.*}.aiff"
alac="${flac%.*}.m4a"
flac -s -d --force-aiff-format -o "$aiff" "$flac"
afconvert -f m4af -d alac "$aiff" "$alac"