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
/** | |
* Create an ipcortex user, using the create REST call | |
* @param {string} username - Login username "fred" | |
* @param {string} name - Full name "Fred Smith" | |
* @param {string} password - New poassword, should be non empty complex string | |
* @param {string} host - host to make REST request on | |
* @param {string} apikey - API key with user create permissions | |
* @returns {Promise} - resolves or rejects when request completes | |
*/ | |
function IPCAddUser(username, name, password, host, apikey) { |
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 { AppRegistry } from 'react-native'; | |
import App from './app/index.js'; | |
AppRegistry.registerComponent('native_plus_web', () => App); |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const rootDirectory = path.resolve(__dirname, '../'); | |
const appDirectory = path.resolve(__dirname, '../app'); | |
// This is needed for webpack to compile JavaScript. | |
// Many OSS React Native packages are not compiled to ES5 before being | |
// published. If you depend on uncompiled packages they may cause webpack build | |
// errors. To fix this webpack can be configured to compile to the necessary |
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
from microbit import * | |
# From https://support.microbit.org/support/solutions/articles/19000070728-how-to-read-the-device-serial-number | |
def get_serial_number(): | |
NRF_FICR_BASE = 0x10000000 | |
DEVICEID_INDEX = 25 # deviceid[1] | |
@micropython.asm_thumb | |
def reg_read(r0): | |
ldr(r0, [r0, 0]) |