Skip to content

Instantly share code, notes, and snippets.

@ksmandersen
ksmandersen / JSONFixture
Created April 8, 2014 16:42
Load JSON fixture files for your XCTests
@interface JSONFixture : NSObject
+ (id)fixtureDataWithName:(NSString *)fixtureName;
@end
@implementation JSONFixture
+ (id)fixtureDataWithName:(NSString *)fixtureName {
@nicolasembleton
nicolasembleton / restart_bluetooth.sh
Last active May 11, 2024 17:43
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@htr3n
htr3n / macos-ramdisk.md
Last active July 18, 2024 08:22
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: