The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.
The following packages are required:
bluez
:bluetoothd
bluez-utils
:bluetoothctl
,rfcomm
package main | |
import ( | |
"flag" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" |
//assumes you have the following environment variables setup for AWS session creation | |
// AWS_SDK_LOAD_CONFIG=1 | |
// AWS_ACCESS_KEY_ID=XXXXXXXXXX | |
// AWS_SECRET_ACCESS_KEY=XXXXXXXX | |
// AWS_DEFAULT_REGION=us-east-1 | |
package main | |
import ( | |
"fmt" |
declare var __DEV__: boolean; | |
declare module 'react-native' { | |
declare type Color = string | number; | |
declare type Transform = | |
{ perspective: number } | | |
{ scale: number } | | |
{ scaleX: number } | |
declare var __DEV__: boolean; | |
declare module 'react-native' { | |
declare type Color = string | number; | |
declare type Transform = | |
{ perspective: number } | | |
{ scale: number } | | |
{ scaleX: number } | |
// node.js 0.5 Diffie-Hellman example | |
var assert = require("assert"); | |
var crypto = require("crypto"); | |
// the prime is shared by everyone | |
var server = crypto.createDiffieHellman(512); | |
var prime = server.getPrime(); | |
// sharing secret key on a pair |
# Defaults / Configuration options for homebridge | |
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
# If you uncomment the following line, homebridge will log more | |
# You can display this via systemd's journalctl: journalctl -f -u homebridge | |
# DEBUG=* |
Safari View Controller is iOS 9 only. You need Xcode 7 (beta 2 currently) to use it
React Native 0.6.0 is the minimum I got this working on
You might need to add this to your Info.plist in order for iOS 9 to load your application correctly:
<key>NSAppTransportSecurity</key>
var request = require('request'); | |
var sendMessage = function(device, message){ | |
var restKey = '****'; | |
var appID = '****'; | |
request( | |
{ | |
method:'POST', | |
uri:'https://onesignal.com/api/v1/notifications', | |
headers: { |