Skip to content

Instantly share code, notes, and snippets.

@jamiebullock
jamiebullock / au_input_create
Last active September 24, 2022 10:27
Set up RemoteIO or HALOutput Audio Unit for recording
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
#define INPUT_BYTES_PER_SAMPLE sizeof(SInt16)
#define AU_IO_COMPONENT kAudioUnitSubType_RemoteIO
#define AU_DEFAULT_COMPONENT AU_IO_COMPONENT
#elif TARGET_OS_MAC
#define INPUT_BYTES_PER_SAMPLE sizeof(Float32)
#define AU_IO_COMPONENT kAudioUnitSubType_HALOutput
#define AU_DEFAULT_COMPONENT kAudioUnitSubType_DefaultOutput
#endif
@lalunamel
lalunamel / .envrc
Last active February 8, 2025 01:57
Add node_modules folder to PATH
PATH_add ./node_modules/.bin
@FreddieOliveira
FreddieOliveira / docker.md
Last active August 31, 2025 01:37
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@padeoe
padeoe / README_hfd.md
Last active September 1, 2025 09:19
CLI-Tool for download Huggingface models and datasets with aria2/wget: hfd

🤗Huggingface Model Downloader

Note

(2025-01-08) Add feature for 🏷️Tag(Revision) Selection, contributed by @Bamboo-D.
(2024-12-17) Add feature for ⚡Quick Startup and ⏭️Fast Resume, enabling skipping of downloaded files, while removing the git clone dependency to accelerate file list retrieval.

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, This command-line tool leverages curl and aria2c for fast and robust downloading of models and datasets.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
@sudara
sudara / core_audio_tap_example.m
Created May 11, 2024 17:56 — forked from directmusic/core_audio_tap_example.m
An example how to use the new Core Audio Tap API in macOS 14.2.
// This is a quick example of how to use the CoreAudio API and the new Tapping
// API to create a tap on the default audio device. You need macOS 14.2 or
// later.
// Build command:
// clang -framework Foundation -framework CoreAudio main.m -o tapping
// License: You're welcome to do whatever you want with this code. If you do
// something cool please tell me though. I would love to hear about it!