Skip to content

Instantly share code, notes, and snippets.

@random-developer
random-developer / test.c
Created February 26, 2021 15:40 — forked from nad2000/test.c
Basic examples to show how to embed and extend Python in C including: creation of module in C with functions handling and building Python objects; importing and calling python functions from C.
/* Example of embedding Python in another program */
// to compile run:
// gcc -o test $(python-config --cflags) test.c $(python-config --ldflags) && ./test
#include<stdio.h>
#include "Python.h"
void initxyzzy(void); /* Forward */
main(int argc, char **argv)
@random-developer
random-developer / SceneKitCheatSheet.m
Created November 24, 2019 15:54 — forked from armadsen/SceneKitCheatSheet.m
Cheat sheet for SceneKit learning app (Objective-C)
// Configure the Scene View
self.sceneView.backgroundColor = [UIColor darkGrayColor];
// Create the scene
SCNScene *scene = [SCNScene scene];
@random-developer
random-developer / AutoHook.h
Created May 28, 2019 01:20 — forked from JohnCoates/AutoHook.h
Simple Objective-C Method Hooking
@protocol AutoHook <NSObject>
@required
+ (NSArray <NSString *> *)targetClasses;
@end