Skip to content

Instantly share code, notes, and snippets.

var noble = require('noble');
var serviceUuids = ['6e400001b5a3f393e0a9e50e24dcca9e']
var characteristicUuids = ['6e400002b5a3f393e0a9e50e24dcca9e']
noble.on('stateChange', function(state) {
if (state === 'poweredOn') {
noble.startScanning(serviceUuids, false);
} else {
noble.stopScanning();
diff --git a/VirtualJaguar/VirtualJaguar/JaguarGameCore.h b/VirtualJaguar/VirtualJaguar/JaguarGameCore.h
index 66b7c3b..d3c106c 100644
--- a/VirtualJaguar/VirtualJaguar/JaguarGameCore.h
+++ b/VirtualJaguar/VirtualJaguar/JaguarGameCore.h
@@ -32,7 +32,7 @@ OE_EXPORTED_CLASS
@interface JaguarGameCore : OEGameCore
- (void)initVideo;
-void audio_callback_batch(uint8 *buff, int len);
+void audio_callback_batch(uint16_t *buff, int len);
//
// main.c
// CopyList
//
// Created by Joshua Weinberg on 3/25/13.
// Copyright (c) 2013 Joshua Weinberg. All rights reserved.
//
#include <iostream>
#include <map>
//
// main.c
// CopyList
//
// Created by Joshua Weinberg on 3/25/13.
// Copyright (c) 2013 Joshua Weinberg. All rights reserved.
//
#include <iostream>
#include <map>
//
// main.c
// CopyList
//
// Created by Joshua Weinberg on 3/25/13.
// Copyright (c) 2013 Joshua Weinberg. All rights reserved.
//
#include <iostream>
#include <map>
NSString *str = [[NSString alloc] initWithBytes:({uint32_t t = 0x1F4A9; &t;}) length:4 encoding:NSUTF32LittleEndianStringEncoding];
NSLog(@"%@", str);
const int CLK = 1;
const int STROBE = 0;
const int DATA = 2;
int buttons[8] = {0,0,0,0,0,0,0,0};
int shift = 0;
void setup() {
Serial.begin(115200);
pinMode(CLK, INPUT_PULLUP);
#import <Foundation/Foundation.h>
#import <sys/socket.h>
#define WEAK_BLOCK(var, __VA_ARGS__) \
(^(typeof(var) __strong var##Strong){ \
__weak typeof(var) var##Weak = var##Strong; \
return ^{ \
typeof(var) var = var##Weak; \
__VA_ARGS__ \
}; \
#import <Foundation/Foundation.h>
#import <sys/socket.h>
@interface Foo : NSObject
@property (nonatomic, copy) void (^testBlock)();
@end
@implementation Foo
- (void)doThings
PS3 Sixaxis
Sony PS3 Sixaxis Wireless
Xbox 360
Microsoft Official Wired
Microsoft Official Wireless
JoyTek 360
BigBen 360
Pelican 360
MadCatz Gamepad
MadCatz Pro Gamepad