This file contains 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
set encoding=utf-8 | |
set nobackup | |
set noswapfile | |
set nocompatible | |
set autoindent | |
set showcmd | |
set visualbell | |
set ignorecase | |
set smartcase | |
set ruler |
This file contains 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 | |
require 'Services/Twilio.php'; | |
$ACCOUNT_SID = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
$AUTH_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
$client = new Services_Twilio($ACCOUNT_SID, $AUTH_TOKEN); | |
try { | |
$notifications = $client->account->notifications->getIterator(); |
This file contains 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'); | |
echo '<?xml version="1.0" encoding="UTF-8"?>'; | |
?> | |
<Response> | |
<?php | |
// When an SMS comes into your Twilio phone number, Twilio passes | |
// the body of the SMS to your web app in the Body parameter. | |
$keyword = strtolower(trim($_REQUEST['Body'])); |
This file contains 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 | |
// The Twilio helper library. Get a copy here: http://www.twilio.com/docs/libraries/ | |
require_once('twilio.php'); | |
// Uses the FreshBooks helper library written by Milan Rukavina. Get a copy | |
// here: http://code.google.com/p/freshbooks-php-library/ | |
require_once('FreshBooks/Payment.php'); | |
require_once('FreshBooks/Invoice.php'); | |
require_once('FreshBooks/HttpClient.php'); |
This file contains 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 'twiliolib' | |
# Twilio REST API version | |
API_VERSION = '2010-04-01' | |
# Twilio AccountSid and AuthToken | |
ACCOUNT_SID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
ACCOUNT_TOKEN = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' | |
FROM_ID = 'xxx-xxx-xxx'; |
This file contains 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 | |
class DB { | |
const DB_NAME = 'votes.sqlite'; | |
protected $db; | |
function __construct() { | |
$this->db = new PDO('sqlite:'.self::DB_NAME); | |
} |
This file contains 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 | |
/* | |
* Code from Twilio talk given at the L.A. Hacker News Meetup on 11/13/2010 | |
* | |
* During the talk, everyone was asked to vote (vote.php) whether they were | |
* awesome or not (text "1" for awesome, anything else for not awesome). | |
* Afterwards, the first person to vote was called up and told they were | |
* awesome. In this script, we call up the first person to vote that they're | |
* awesome and the first person to vote that they're not, in the hopes that | |
* the awesome person can help the not awesome person be awesome. Awesome, |
This file contains 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 | |
// OAuthSimple can be found at http://github.com/jrconlin/oauthsimple/ | |
require_once('OAuthSimple.php'); | |
// You'll likely want to move $consumer_key and $consumer_secret to an | |
// include file | |
$consumer_key = '[The key given to you by Netflix]'; | |
$consumer_secret = '[The shared secret given to you by Netflix]'; | |
$oauth_token = $_GET['oauth_token']; |