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
| packages: | |
| pkg.installed: | |
| - names: | |
| - python | |
| - python-dev | |
| - python-pip | |
| pip-upgrade: | |
| pip.installed: | |
| - upgrade: True |
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
| vim-deps: | |
| pkg.installed: | |
| - names: | |
| - exuberant-ctags | |
| - require_in: | |
| - pkg: vim | |
| vim-vundle: | |
| git.latest: | |
| - name: git://github.com/gmarik/vundle.git |
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
| import unittest | |
| from mock import patch | |
| import mymodule | |
| class APITest(unittest.TestCase): | |
| @patch('requests.get') | |
| def test_wrapped_example(self, MockRequests): | |
| mock_request = MockRequests() | |
| # Set your status code you want to test against |
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 twilio import twiml | |
| # First, we'll add your favorite HTTP client and mine, Requests | |
| import requests | |
| app = Flask(__name__) | |
| # First, we give our app the key we retrieved from the | |
| # New York Times API developer dashboard | |
| app.config['NYTIMES_API_KEY'] = "key_we_registered" |
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 twilio import twiml | |
| app = Flask(__name__) | |
| # Let's adjust this route to create a custom wait | |
| # experience for our conference call. | |
| @app.route('/conference', 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
| # Import our dependencies | |
| from flask import Flask | |
| from twilio import twiml | |
| # Instantiate our Flask app | |
| app = Flask(__name__) | |
| # Create an endpoint '/conference' to serve as our |
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 render_template | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return render_template('index.html') | |
| if __name__ == "__main__": |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <title>Rob's Awesome Map</title> | |
| <head> | |
| <script | |
| src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
| <style> | |
| html, body, #map-canvas { | |
| margin: 0; | |
| padding: 0; |
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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'twilio-ruby' | |
| # Endpoint for the call-in line that your customers call. | |
| post '/caller' do | |
| Twilio::TwiML::Response.new do |r| | |
| r.Enqueue 'Customer Queue', :waitUrl => '/wait' | |
| end.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
| <?php | |
| // Documentation is here: https://twilio-php.readthedocs.org/en/latest/ | |
| require_once('auth.php'); | |
| require_once('Services/Twilio.php'); | |
| $client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN); | |
| $message = $client->account->sms_messages->create( |