Skip to content

Instantly share code, notes, and snippets.

View drewandre's full-sized avatar

Drew André drewandre

View GitHub Profile
@drewandre
drewandre / sbCreateUserListQuery.js
Created July 22, 2019 16:15
SendBird user list query
export const sbCreateUserListQuery = userIdsArray => {
const sb = SendBird.getInstance()
let applicationUserListQuery = sb.createApplicationUserListQuery()
applicationUserListQuery.limit = 100
applicationUserListQuery.userIdsFilter = userIdsArray
return applicationUserListQuery
};
@drewandre
drewandre / App.js
Last active January 31, 2020 14:11
export class App extends Component {
constructor(props) {
super(props)
this.BLEManager = new BleManager({
restoreStateIdentifier: 'bleManagerRestoredState',
restoreStateFunction: bleRestoredState => this.handleBLEManagerStateRestoration(bleRestoredState)
})
this.BLEManager.setLogLevel(LogLevel.Verbose)
this.BLEManager.onDeviceDisconnected(() => console.log('hey, device disconnected'))
this.props.actions.saveBLEManager(this.BLEManager)
@drewandre
drewandre / apa102
Last active October 17, 2018 02:49
#include <FastLED.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#define NUM_LEDS 300
#define DATA_PIN 7
#define CLOCK_PIN 14
CRGB leds[NUM_LEDS];
// Main code for Master Node RF Reading and GPRS Transmitting //
// Written by Kuan-Sheng Chen and Karim Abdallah. July 26 2017. Save the Date.
//
// v 1.0. Includes RF Reading, data parsing, and trasmitting to AWS database with POST.
// Ain't she a beauty.
// Libraries and inspiration courtesy of Adafruit and various partners.
#include <SPI.h>
#include <RH_RF95.h>