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
| Twilio = Object.create({}) | |
| Twilio.TwiML = { | |
| build: function(fn) { | |
| var prolog = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; | |
| var Buffer = function(level) { | |
| var buffer = ""; | |
| var indent = function(i) { return new Array((i * 2) + 1).join(" ") } | |
| var level = level || 1; | |
| var append = function(str) { | |
| buffer += indent(++level) + str + "\n"; |
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
| get('/apps/:app_id', function() { | |
| return "hello world"; | |
| }); | |
| post('/apps', function() { | |
| // do some shit | |
| status(201); | |
| headers({ location: resource_url }); | |
| }); |
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
| /** | |
| * Adam Theme / Dark Theme | |
| * Standard Layout for Spotify Client | |
| * Defines the basic styles for an app | |
| * @copyright 2011 by Spotify | |
| */ | |
| /** | |
| * Declarations for Adam Theme | |
| * |
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/template', id: 'number_search_result' } | |
| %input{ name: '<%= friendly_name %>', value: '<%= phone_number %>', type: 'radio' } |
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
| <Response> | |
| <Gather> | |
| <Input name="credit_card[number]"> | |
| <Say>Please enter the long number on the front of your card.</Say> | |
| </Input> | |
| <Input name="credit_card[expiry_date]"> | |
| <Say>Now enter your expiry date</Say> | |
| </Input> | |
| </Gather> | |
| </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
| list = [1..10] | |
| squares = list.map (num) -> num * num | |
| squares = (num * num for num in list) | |
| // Compiles to... | |
| var list, num, squares; | |
| list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
| squares = list.map(function(num) { |
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
| # using twilio-rb | |
| Twilio::Call.create to: telephone_number_of_participant, from: your_caller_id, url: conference_resource_url |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Response> | |
| <Say>Thanks for calling</Say> | |
| <Sms>Thanks for calling</Sms> | |
| </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
| require 'net/https' | |
| https = Net::HTTP.new('api.twilio.com', 443) | |
| https.use_ssl = true | |
| https.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
| https.request_get('/') |
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
| // why this? | |
| Array.prototype.slice.call(arguments, 1) | |
| // when you can do this? | |
| [].slice.call(arguments, 1) |