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 install express | |
npm install body-parser |
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
pip 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
pip install ‘flask>=1.0’ |
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 handlers = { | |
'LaunchRequest': function () { | |
this.emit('SayHello'); | |
}, | |
'SayHello': function(){ | |
if (this.event.user.hasOwnProperty('accessToken')) { | |
this.response.speak('Hello User'); | |
this.emit(':responseReady'); | |
} | |
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
var handlers = { | |
'LaunchRequest': function () { | |
this.emit('SayHello'); | |
}, | |
'SayHello': function(){ | |
if (this.event.user.hasOwnProperty('accessToken')) { | |
this.response.speak('Hello User'); | |
this.emit(':responseReady'); | |
} | |
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
// Downsample frames from 16Khz to 8Khz | |
function convert(message){ | |
var arr = [] | |
var x = 0; | |
var y; | |
var i; | |
for (i = 0; i < 160; i++) { | |
y = x+2 | |
arr.push(message.slice(x,y)) | |
x += 4; |
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
Sams-iMac:~ smachin$ openssl s_client -connect raw.githubusercontent.com:443 | |
CONNECTED(00000003) | |
depth=1 /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA | |
verify error:num=20:unable to get local issuer certificate | |
verify return:0 | |
--- | |
Certificate chain | |
0 s:/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=www.github.com | |
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA | |
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA |
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
#! /usr/bin/env node | |
var Bleacon = require('bleacon'); | |
var uuid = '842AF9C408F511E39282F23C91AEC05E'; | |
var major = 65000; | |
var measuredPower = -59; | |
function myLoop(){ | |
setTimeout(function () { | |
Bleacon.stopAdvertising(); |
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
GET /plus/v2whitelisted/people/lookup?includePeople=1&includeGal=1&type=phone&fields=kind,items(id,metadata(objectType,plusPageType,attributions),names,phoneNumbers(value,type,formattedType,canonicalizedForm),addresses(value,type,formattedType),images(url,metadata(container)),urls(value),placeDetails)&includePlaces=1&callType=outgoing&id=%2B441934834343 HTTP/1.1 | |
Authorization: Bearer xxxxxxxxxREDACTEDxxxxxxxxxxxxx | |
User-Agent: Dalvik/2.1.0 (Linux; U; Android 6.0.1; Nexus 6 Build/MMB29S) | |
Host: www.googleapis.com | |
Connection: Keep-Alive | |
Accept-Encoding: gzip | |
HTTP/1.1 200 OK | |
Expires: Fri, 29 Jan 2016 12:47:28 GMT |
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
import dropbox | |
import tinys3 | |
import tempfile | |
from string import Template | |
import random | |
import string | |
S3_ACCESS_KEY = "" | |
S3_SECRET_KEY= "" |