Skip to content

Instantly share code, notes, and snippets.

@threedaymonk
threedaymonk / format.md
Last active April 10, 2025 05:59
Roland SP-404SX sample format

Roland SP-404SX sample file format

Notes

Field types are marked using C-style notation:

  • char[4] indicates a 4-byte fixed-width string
  • uint[6] indicates a 6-byte sequence
  • uint8, uint16, and uint32 are unsigned byte, short, and long integers
  • int8, int16, and int32 are signed byte, short, and long integers
@htr3n
htr3n / macos-ramdisk.md
Last active March 30, 2025 14:42
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@fnky
fnky / ANSI.md
Last active April 24, 2025 13:43
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@christopheranderton
christopheranderton / digging-into-wondershare-notes.md
Last active March 28, 2025 22:44
Scratchpad/Notes for digging into the shady business of Wondershare. Not complete (it's a scratchpad after all!)

NOTEPAD : Digging into Wondershare

[See the Host entries at the end of the document]


http://en.0430.com/cn/web86683/

Sharer:	wadmin00126	Category:	software companies

Score: (59) PR: PR:PR:4

@jonathantneal
jonathantneal / recovery.sh
Last active November 10, 2023 01:01
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@mayankk2308
mayankk2308 / disable-amd-gpu.sh
Last active April 12, 2023 02:45
Disable AMD GPU acceleration on macOS
# This can be useful to force the system to use only the integrated GPU at all times.
# This only applies to modern AMD GPUs (using the AMDRadeon4000 series kernel extension or later).
# Set mux to integrated Intel GPU
sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
# Option #1: Completely disable automatic graphics switching and any other GPUs
sudo nvram boot-args="agc=-1"
# Option #2: Disable just the AMD GPU framebuffer
@166MMX
166MMX / 10.12.csv
Last active December 29, 2017 07:23
bundleDisplayName bundleShortVersionString itemId softwareVersionBundleId softwareVersionExternalIdentifier ProductVersion ProductBuildVersion
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 817891742
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818657038
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818744109
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818745269
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818758005
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818806283
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818872651
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 818907548
Install macOS Sierra 1127487414 com.apple.InstallAssistant.Sierra 819278692
@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active April 5, 2025 11:38
Macbook Pro 2011 - Disable AMD GPU
@jonbakerfish
jonbakerfish / loop_aria2.sh
Last active August 14, 2024 20:08
aria2 downloads a list of files, loop until all file are finished
#!/bin/bash
aria2c -j5 -i list.txt -c --save-session out.txt
has_error=`wc -l < out.txt`
while [ $has_error -gt 0 ]
do
echo "still has $has_error errors, rerun aria2 to download ..."
aria2c -j5 -i list.txt -c --save-session out.txt
has_error=`wc -l < out.txt`
sleep 10
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active March 28, 2025 20:13
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation