Skip to content

Instantly share code, notes, and snippets.

View ChloeCodesThings's full-sized avatar

Chloe Condon ChloeCodesThings

View GitHub Profile
@ChloeCodesThings
ChloeCodesThings / fakebfsample.xml
Last active March 28, 2019 16:01
Sample Fake BF TwiML
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="man">Hey girl- call me! It is I, your boyfriend! Please call me as soon as you can! It is very urgent!</Say>
<Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>
@ChloeCodesThings
ChloeCodesThings / index.js
Last active March 29, 2019 04:54
An Ambivert's Guide to Azure Functions Sample Code- Message Example
const accountSid = process.env.TWILIO_SID;
const authToken = process.env.TWILIO_TOKEN;
const client = require('twilio')(accountSid, authToken);
// This can also be accomplished with a Twilio output binding- you can read more on this at http://aka.ms/AA4n3j3
module.exports = async function (context) {
const twilioOptions = {
from: process.env.SENDER_NUMBER,
body: 'Hey- please call me ASAP. Locked out of apartment ',
@ChloeCodesThings
ChloeCodesThings / index.js
Last active March 29, 2019 05:15
An Ambivert's Guide to Azure Functions Sample Code- Call Example
const accountSid = process.env.TWILIO_SID;
const authToken = process.env.TWILIO_TOKEN;
const client = require('twilio')(accountSid, authToken);
// This can also be accomplished with a Twilio output binding- you can read more on this at http://aka.ms/AA4n3j
module.exports = async function (context){
const twilioOptions = {
url: process.env.TWIML_URL,
to: process.env.RECIPIENT_NUMBER,
import requests
import json
subscription_key = '<YOUR-SUBSCRIPTION-KEY>'
assert subscription_key
face_api_url = '<YOUR-FACEAPI-URL>'
image_url = '<URL-OF-IMAGE>'
{
"name": "Lemmy",
"image": "https://www.mariowiki.com/images/thumb/f/fc/MK8_Lemmy_Icon.png/64px-MK8_Lemmy_Icon.png",
"text": "You're pretty chill, and have your moments of happiness. A tiny part of you loves to break the rules",
"msftvintage": "https://bit.ly/2w3JIwF",
"faceapidata": "sadness: 0.0, neutral: 0.27, contempt: 0.001, disgust: 0.0, anger: 0.0, surprise: 0.0, fear: 0.0, happiness: 0.729"
},
import requests
import json
subscription_key = '<YOUR-SUBSCRIPTION-KEY>'
assert subscription_key
face_api_url = '<YOUR-FACEAPI-URL>'
image_url = 'https://pm1.narvii.com/5826/48f03a0d21f56888f42babb86d07459d09638d75_hq.jpg'
@ChloeCodesThings
ChloeCodesThings / index.js
Last active June 4, 2019 19:30
Reminder app sample code
const accountSid = process.env.TWILIO_SID;
const authToken = process.env.TWILIO_TOKEN;
const client = require('twilio')(accountSid, authToken);
module.exports = async function (context, myTimer) {
var timeStamp = new Date().toISOString();
if (myTimer.IsPastDue)
{
context.log('JavaScript is running late!');
@ChloeCodesThings
ChloeCodesThings / index.js
Created June 3, 2019 21:28
Reminder app sample code (phone call)
const accountSid = process.env.TWILIO_SID;
const authToken = process.env.TWILIO_TOKEN;
const client = require('twilio')(accountSid, authToken);
module.exports = async function (context, myTimer) {
var timeStamp = new Date().toISOString();
if (myTimer.IsPastDue)
{
context.log('JavaScript is running late!');
@ChloeCodesThings
ChloeCodesThings / function.json
Created June 3, 2019 21:48
The bindings for our pill reminder function (phone call)
{
"bindings": [
{
"name": "myTimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 10 19 * * *"
},
{
"type": "twilioSms",
@ChloeCodesThings
ChloeCodesThings / index.js
Created September 29, 2019 19:21
Function sample for Alerting App
const functions = require('firebase-functions')
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
// Init Twilio