This file contains 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
describe('Router tests', () => { | |
//setup | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [ | |
RouterTestingModule.withRoutes(routes), | |
AppModule | |
] | |
}); | |
}); |
This file contains 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
var kb = require("ble_hid_keyboard"); | |
NRF.setServices(undefined, { hid : kb.report }); | |
var reset_timer; | |
var next = "n"; | |
var prev = "p"; | |
function sendCharNext(){ | |
if (next == next.toLowerCase()){ | |
sk = 0; | |
} else { |
This file contains 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
[ | |
{ | |
"action":"connect", | |
"from":"442038973497", | |
"endpoint":[{ | |
"type":"phone", | |
"number":"447481738558" | |
}] | |
} | |
] |
This file contains 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
[ | |
{ | |
"action": "stream", | |
"streamUrl": [ | |
"https://cdn.glitch.com/079cc071-4677-4893-bdb7-7b3f525ed26e%2Fcall-me-maybe-short.mp3?1550887955998" | |
] | |
}, | |
{ | |
"action": "conversation", | |
"name": "sbh" |
This file contains 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
$ npm init | |
$ npm install nexmo |
This file contains 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 app = require('express')() | |
const bodyParser = require('body-parser') | |
app.use(bodyParser.json()) | |
app.use(bodyParser.urlencoded({ extended: true })) | |
app.listen(3000) |
This file contains 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
$ touch index.js |
This file contains 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 Nexmo = require('nexmo') | |
const nexmo = new Nexmo({ | |
apiKey: NEXMO_API_KEY, | |
apiSecret: NEXMO_API_SECRET | |
}) |
This file contains 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
let text = "👋Hello from Nexmo"; | |
nexmo.message.sendSms("Nexmo", "TO_NUMBER", text, { | |
type: "unicode" | |
}, (err, responseData) => { | |
if (err) { | |
console.log(err); | |
} else { | |
if (responseData.messages[0]['status'] === "0") { | |
console.log("Message sent successfully."); |
This file contains 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 Nexmo = require('nexmo') | |
const nexmo = new Nexmo({ | |
apiKey: NEXMO_API_KEY, | |
apiSecret: NEXMO_API_SECRET, | |
applicationId: NEXMO_APPLICATION_ID, | |
privateKey: NEXMO_APPLICATION_PRIVATE_KEY_PATH | |
}) |