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
<?php | |
header('Content-type: text/xml'); | |
$body = $_REQUEST['Body']; | |
if ($body == "Yes") { | |
$response = "You said yes."; | |
} else { | |
$response = "You didn't say yes."; | |
} |
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
def connect | |
# Our response to this request will be an XML document in the "TwiML" | |
# format. Our Ruby library provides a helper for generating one | |
# of these documents | |
response = Twilio::TwiML::Response.new do |r| | |
r.Dial '[INSERT AGENT PHONE NUMBER HERE]' | |
end | |
render text: response.text | |
end |
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
<script type="text/javascript"> | |
dataLayer = []; | |
</script> |
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 twilio.rest import TwilioRestClient | |
ACCOUNT_SID = "ACxxxxxxxx" | |
AUTH_TOKEN = "yyyyyyyyyyy" | |
TWILIO_NUMBER = "+15556667777" | |
NUMBER_TO_TEXT = "+12223334444" | |
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN, base="https://api.twilio.com:8443") | |
client.messages.create(from_=TWILIO_NUMBER, to=NUMBER_TO_TEXT, body="Your system is ready for the upcoming change to the Twilio API's SSL certificate. No further action is needed.") |
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 instagram.client import InstagramAPI | |
api = InstagramAPI( | |
client_id='XXXXXXXXXXXXXXXXXXXXXXXXX', | |
client_secret='YYYYYYYYYYYYYYYYYYYYYYYYYY') | |
search_results = api.user_search(q='natgeo') | |
print(search_results) |
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
<?php | |
header('Content-type: text/xml'); | |
$body = $_REQUEST['Body']; | |
?> | |
<Response /> |
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
for i in range(1, 17): | |
the_word = 'Bird' | |
if i % 4 == 0: | |
print "%s is the word." % the_word | |
else: | |
print "%s" % the_word |
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 flask import Flask | |
from flask import request | |
from twilio import twiml | |
app = Flask(__main__) | |
@app.route('/sms', methods=['POST']) |
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 twilio.rest import TwilioRestClient | |
import simplejson as json | |
from time import sleep | |
class SocialAlarm(object): | |
def __init__(self): | |
self.counter = 1 |
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
Verifying I am +robspectre on my passcard. https://onename.com/robspectre |