This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
require('./colorTheme.js'); | |
function stringify(obj) { | |
return JSON.stringify(obj, undefined, 4); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
TextInput, | |
TouchableOpacity, | |
Text, | |
KeyboardAvoidingView, | |
View, | |
} from 'react-native'; | |
import { Permissions, Notifications } from 'expo'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sendPushNotification(token = this.state.token, title = this.state.title, body = this.state.body) { | |
return fetch('https://exp.host/--/api/v2/push/send', { | |
body: JSON.stringify({ | |
to: token, | |
title: title, | |
body: body, | |
data: { message: `${title} - ${body}` }, | |
}), | |
headers: { | |
'Content-Type': 'application/json', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async registerForPushNotifications() { | |
const { status } = await Permissions.getAsync(Permissions.NOTIFICATIONS); | |
if (status !== 'granted') { | |
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS); | |
if (status !== 'granted') { | |
return; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SONG_H | |
#define SONG_H | |
#define Song const uint8_t PROGMEM | |
Song music[] = { | |
0x14, // Number of tracks | |
0x00, 0x00, // Address of track 0 | |
0x27, 0x00, // Address of track 1 | |
0x42, 0x00, // Address of track 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SONG2_H | |
#define SONG2_H | |
#include "atm_cmd_constants.h" | |
#ifndef ARRAY_SIZE | |
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) | |
#endif | |
#ifndef NUM_PATTERNS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SONG_H | |
#define SONG_H | |
#define Song const uint8_t PROGMEM | |
Song music[] = { | |
0x14, // Number of tracks | |
0x00, 0x00, // Address of track 0 | |
0x27, 0x00, // Address of track 1 | |
0x42, 0x00, // Address of track 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
Image, | |
Dimensions, | |
PanResponder | |
} from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JAVASCRIPT To generate this stuff below: (Paste in JSFIddle.net) | |
var map = { | |
'A' : 0, | |
'B' : 1, | |
'C' : 2, | |
'D' : 3, | |
'E' : 4, | |
'F' : 5, | |
'G' : 6, | |
'H' : 7, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"timestamp": 1476970157974, // Let's use this to determine changes. | |
// Sourced from http://www.goruck.com/event-landing | |
"eventLocations" : { | |
"eventTypes": [ | |
{ | |
"eventTypeId": 1004, | |
"eventTypeName": "Ascent", | |
"eventCategoryId": 2, |
NewerOlder