Skip to content

Instantly share code, notes, and snippets.

View leptos-null's full-sized avatar
🏔️
Darwin tooling

Leptos leptos-null

🏔️
Darwin tooling
View GitHub Profile
@leptos-null
leptos-null / printBitRepresentation.h
Last active September 2, 2018 01:49
Three macros for printing the bit representation of a fixed-point value
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
/* prints each character representation of the byte one at a time.
* no memory management required; slower, than using a buffer.
*/
#define printBitRepresentationEach(a) \
({ \
for (size_t _i = (sizeof(a) * CHAR_BIT); _i; _i--) { \
@leptos-null
leptos-null / inspectivec.cy
Last active December 15, 2018 23:31
InspectiveC module for Cycript
/* InspectiveC by DavidGoldman
* Place this file in `/usr/lib/cycript0.9/com/golddavid/inspectivec.cy`
* Run `@import com.golddavid.inspectivec` in cycript to use.
*
* This file has been adapted from
* https://github.com/DavidGoldman/InspectiveC/blob/master/cycript/InspectiveC.cy
* to use new cycript module features.
*
* This module is based on
* https://github.com/limneos/classdump-dyld/blob/master/classdumpdyldlib/classdumpdyld.cy