Skip to content

Instantly share code, notes, and snippets.

View PierceLBrooks's full-sized avatar
🇵🇸

Pierce Brooks PierceLBrooks

🇵🇸
View GitHub Profile
@T1T4N
T1T4N / generate-xcode-compilation-database.md
Last active April 27, 2026 03:30
Generate a JSON Compilation Database from an Xcode project

Introduction

A JSON compilation database is a very handy output format which is parsed and used by many development tools. Unfortunately for us Apple Developers, it is not straightforward to generate one from within Xcode, as it is (probably) not Apple's priority and therefore there is no toggle/switch/setting that can be easily enabled to get this information.

There is however a solution, thanks to Apple using Clang/LLVM as their main toolchain.

Implementation

The standard way to generate this with clang would be to use the -MJ flag and give it a file name that typically corresponds to the input file. Using this flag indirectly through Xcode is hard, given that we're not aware of all the other arguments when a compiler call is executed.

However, there is a second hidden/badly documented LLVM flag: -gen-cdb-fragment-path - it is implemented in terms of -MJ and has the same functionality, but it's argument in contrast is an output directory.

@frnsys
frnsys / mixamo.json
Created July 25, 2022 20:38
Mixamo rig mapping for BVH retargeter
{
"name" : "Mixamo",
"url" : "",
"bones" : {
"mixamorig:Hips" : "hips",
"mixamorig:Spine" : "spine",
"mixamorig:Spine1" : "spine-1",
"mixamorig:Spine2" : "chest",
"mixamorig:Neck" : "neck",
@salcoast
salcoast / MrAndyNgo-deleted.md
Last active November 9, 2022 05:47
Updated Deleted Tweets for MrAndyNgo

Deleted tweets for MrAndyNgo

Please view the deleted tweet list in our main archive.

@interfect
interfect / castanet.sh
Last active July 21, 2026 07:24
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.
@DrewTNBD
DrewTNBD / gist:1ad1f26c25afbe3e843e958fa7851680
Created September 30, 2021 20:08
How to create facemaps from a set of known vert groups
def create_facemaps(self, object):
me = object.data
bm = bmesh.new()
bm.from_mesh(me)
bm.select_mode = {'VERT', 'EDGE', 'FACE'}
bm.verts.ensure_lookup_table()
bm.faces.ensure_lookup_table()
fm = bm.faces.layers.face_map.verify()
group_names = ['InnerShell', 'OuterShell', 'UpperBearingEdge', 'LowerBearingEdge']
@loretoparisi
loretoparisi / thread_support.py
Created August 5, 2021 16:56
Python Thread Support with Bounder Thread Pool or Process Executor
from functools import wraps
from .bounded_pool_executor import BoundedThreadPoolExecutor
from .bounded_pool_executor import BoundedProcessPoolExecutor
_DEFAULT_POOL = BoundedThreadPoolExecutor(max_workers=5)
_PROCESS_POOL = BoundedProcessPoolExecutor(max_workers=5)
def threadpool(f, executor=None):
@wraps(f)
def wrap(*args, **kwargs):
@loretoparisi
loretoparisi / bounded_pool_executor.py
Last active April 10, 2025 20:19
Python Thread Support with Bounder Thread Pool or Process Executor
import multiprocessing
import concurrent.futures
import threading
name = 'bounded_pool_executor'
class _BoundedPoolExecutor:
semaphore = None
@Lichtso
Lichtso / unity3d_fs.bms
Created July 15, 2021 14:48
QuickBMS script to extract UnityFS files, the new asset bundle format introduced in Unity 5
# Script for quickbms: https://aluigi.altervista.org/quickbms.htm
# Extracts *.unity3d files
# (c) 2021-07-21 by Lichtso
endian big
# Header
idstring "UnityFS"
Padding 5
get FILE_VERSION byte
@meshula
meshula / character_anim.md
Created May 11, 2021 21:54
Character animation notes

Character Animation

@arthurbacci
arthurbacci / async-input.rs
Created April 9, 2021 22:17
A example of async input using threads in Rust
use std::thread;
use std::sync::mpsc::{self, TryRecvError};
use std::io;
use std::time::Instant;
struct CircularIter<T> where T: Copy {
data: Vec<T>,
index: usize,
}