Skip to content

Instantly share code, notes, and snippets.

View atbaker's full-sized avatar

Andrew Tork Baker atbaker

View GitHub Profile
@atbaker
atbaker / wrap-it-up.xml
Last active May 20, 2020 07:55
Wrap it up: music to wrap up a Zoom meeting a-la the Academy Awards
<?xml version="1.0" encoding="UTF-8"?>
<!-- Learn how to make your own Twilio voice app at www.twilio.com/docs/voice -->
<Response>
<!-- First, say a short message for anyone who's testing the number -->
<Say voice="alice">Thanks for testing Wrap it Up, a Twil-e-o project by Andrew Baker. I'm now going to press 1 to join the Zoom call.</Say>
<!-- Play a sound representing a user pressing 1 on their dialpad, which Zoom requires before adding us to the meeting -->
<Play digits="1"/>
<!-- Wait a second for Zoom to add us to the meeting before starting to play the music -->
<Pause length="1"/>
// Remember to add "/voicemail-record" as the path for your function in the field above!
exports.handler = function(context, event, callback) {
// Initialize our TwiML response. What's TwiML? Learn more here:
// https://www.twilio.com/docs/glossary/what-is-twilio-markup-language-twiml
let twiml = new Twilio.twiml.VoiceResponse();
// <Say> a message to the caller first (feel free to customize it!)
twiml.say({
voice: "alice"
@atbaker
atbaker / stops.py
Created August 22, 2016 17:21
Identify Twilio SMS recipients who have STOP'd your number
"""
See also:
https://support.twilio.com/hc/en-us/articles/223134027-Twilio-support-for-STOP-BLOCK-and-CANCEL-SMS-STOP-filtering-
"""
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import TwilioRestClient
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@atbaker
atbaker / insta.py
Last active November 16, 2015 19:53
Step 1 of insta.py
from instagram.client import InstagramAPI
api = InstagramAPI(
client_id='XXXXXXXXXXXXXXXXXXXXXXXXX',
client_secret='YYYYYYYYYYYYYYYYYYYYYYYYYY')
popular_media = api.media_popular(count=10)
for media in popular_media:
print media.images['standard_resolution'].url
@atbaker
atbaker / README.md
Last active November 3, 2015 23:07
A Django application that supports Twilio webhooks

foo

@atbaker
atbaker / app.py
Last active November 3, 2015 22:56
A Flask application that supports Twilio webhooks
from flask import Flask
from twilio import twiml
app = Flask(__name__)
@app.route('/voice', methods=['POST'])
def incoming_call():
"""Twilio Voice URL - receives incoming calls from Twilio"""
# Create a new TwiML response
resp = twiml.Response()
import csv
import random
import sys
import time
class Attendee(object):
"""A small class to represent an attendee"""
def __init__(self, name, profile_url):
self.name = name
@atbaker
atbaker / new
Created September 28, 2014 21:28
Docker tutorial second static HTML page
<!DOCTYPE html><html><head><meta charset="utf-8"><style>body {
width: 45em;
border: 1px solid #ddd;
outline: 1300px solid #fff;
margin: 16px auto;
}
body .markdown-body
{
padding: 30px;