Skip to content

Instantly share code, notes, and snippets.

View brian-armstrong's full-sized avatar

Brian Armstrong brian-armstrong

  • San Francisco, CA
View GitHub Profile
@brian-armstrong
brian-armstrong / libcorrect.py
Created September 30, 2018 02:39
libcorrect in python
import ctypes
# find the library. for osx this is .dylib, for linux .so, for windows .dll
# path should be an absolute path to where the library was compiled and installed
libcorrect = ctypes.CDLL('/usr/local/lib/libcorrect.dylib')
# tell ctypes about the functions in our library
create = libcorrect.correct_convolutional_create
create.argtypes = [ctypes.c_size_t, ctypes.c_size_t, ctypes.c_void_p]
create.restype = ctypes.c_void_p
@brian-armstrong
brian-armstrong / XA
Created September 18, 2018 08:41
MITSUZEN HDI-10
LINK 800
COPY 1 T
MARK BRANCH
COPY 1 X
REPL NEXT
COPY 3 X
REPL NEXT
COPY -1 X
REPL NEXT
import Foundation
/**
* Foo configuration
*
* These options configure a Foo instance
*
*/
open class Foo : NSObject {
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
* Foo configuration
*
* These options configure a Foo instance
*
*/
@brian-armstrong
brian-armstrong / header.yaml
Created August 14, 2018 07:37
Sourcekitten Objective-C Header Conversion
key.request: source.request.editor.open.interface.header
key.name: "1F3F8533-DD3F-4B63-8B4F-80BA94CCF3CA"
key.filepath: "/Users/username/code/Project/Foo.h"
key.compilerargs:
- "-x"
- "objective-c"
- "/Users/username/code/Project/Foo.h"
- "-isysroot"
- "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk"
@brian-armstrong
brian-armstrong / quiet-profiles.json
Created March 10, 2016 10:50
Example quiet.js profile
{
"audible": {
"checksum_scheme": "crc32",
"inner_fec_scheme": "v27",
"outer_fec_scheme": "none",
"mod_scheme": "gmsk",
"frame_length": 25,
"modulation": {
"center_frequency": 4200,
"gain": 0.15