Skip to content

Instantly share code, notes, and snippets.

@vi
vi / pbcopy_html.swift
Created June 24, 2023 23:32
Command line tool, like `xclip -in -t text/html` for Mac. For preparing content for Google Docs/Sheets.
#!/usr/bin/env swift
// Based on https://github.com/chbrown/macos-pasteboard/issues/8#issuecomment-906537204
import Cocoa
import Foundation
let pasteboard: NSPasteboard = .general
let dataTypeName : String = "public.html"
@emleddin
emleddin / 1-ANKI-remote.md
Last active September 17, 2025 22:07
Instructions for using the 8BitDo Zero 2 with ANKI on Linux and MacOS

Using the 8BitDo Zero 2 Remote with ANKI

The 8BitDo Zero 2 remote is ~$20 and can be used to gamify your studying.

See controller image below

The controller comes with preset keybindings that aren’t the most helpful. So, through the use of a key remapping software, you’ll update how your device interprets the keys!

If you don’t want to download a remapper, you should be able to use an

@jerrywoo96
jerrywoo96 / BigSur.sh
Last active November 7, 2025 06:18
VMware macOS
#!/bin/sh
# chmod +x BigSur.sh
# ./BigSur.sh
echo "\nStep 1: Remove any failed previous attempts\n"
hdiutil detach /Volumes/'Shared Support' -force
hdiutil detach /Volumes/'Install macOS Big Sur' -force
hdiutil detach /Volumes/'Install macOS' -force
rm ~/Desktop/'Install macOS.dmg'
@aditya-r-m
aditya-r-m / crgb.cc
Last active December 2, 2025 07:16
Custom Trident Z DRAM RGB Turndown
// Pieces extracted & trimmed from https://gitlab.com/CalcProgrammer1/OpenRGB
// Basic usage : g++ crgb.cc -o ledoff && ./ledoff
// For turning off RAM LEDs at startup : compile in root home directory & add "@reboot /root/ledoff" to "sudo crontab -e"
#include <cstring>
#include <iostream>
#include <linux/i2c-dev.h>
#include <linux/i2c.h>
#include <sys/ioctl.h>
@smithjw
smithjw / install_xcode_xip.sh
Created May 20, 2022 00:05
Install Xcode xip from Self Service
#!/bin/bash
XCODE_VERSION="$4"
XCODE_TRIGGER="$5"
XCODE_NAME="Xcode-${XCODE_VERSION}"
XCODE_XIP_CACHE="/Library/Application Support/JAMF/Waiting Room/${XCODE_NAME}.xip.pkg"
XCODE_XIP_PATH="/Library/Management/${XCODE_NAME}.xip"
UNXIP="/Library/Management/Tools/unxip"
LOG_FOLDER="/private/var/log"
@paulirish
paulirish / Code.gs
Created March 4, 2022 21:33
finding most common senders in gmail - apps script
// this is pretty quick and rough.. but it works
// script.google.com
// settings to allow editing the appscript.json
// set these two files
// then hit Run with function 'run'
const all = {};
function run() {
@pranavdeshai
pranavdeshai / nord.json
Last active March 4, 2025 20:04
Nord theme for Anki UI using the ReColor add-on
{
"colors": {
"BORDER": [
"Border",
"#D8DEE9",
"#434C5E",
"--border"
],
"BURIED_FG": [
"Buried Foreground",
@LukeChannings
LukeChannings / WtFnZb-Renamer.py
Created February 13, 2022 20:21
WtFnZb-Renamer.py
#!/usr/bin/env python3
### NZBGET SCAN SCRIPT
# Extract filenames from subjects containing [PRiVATE]-[WtFnZb]
#
# This extensions extracts obfuscated filenames from .nzb files
# created by WtFnZb.
#
# Supported subject formats:
#
@hectorddmx
hectorddmx / iOS, Swift, Objective-C resources.md
Last active February 9, 2023 02:05
iOS, Swift, Objective-C resources

iOS, Swift, Objective-C resources

#ios #swift #objective-c #objc #obj-c #articles #tutorials #resources #tools #blogs #apps #services #books #courses

For a beginner that’s starting from scratch, I currently recommend HackingWithSwift since it’s free and it has a structured learning path. I’ve seen some juniors start successfuly with SwiftUI first which is easier for them and then go deep with UIKit.

@import Darwin;
@import ObjectiveC;
@import CloudKit;
extern bool GEOConfigGetBOOL(int feature, void* something);
// Hooks feature flags in a resigned Maps.app to return true.
// Usage:
// clang -shared -fmodules -o libmaps_inject.dylib maps_inject.m \
// "$(xcrun