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
/** | |
* Module dependencies. | |
*/ | |
var readline = require('readline'); | |
var stream = require('stream'); | |
var fs = require('fs'); | |
/** |
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
<script type="text/javascript"> | |
function getQueryParam(url, param) { | |
param = param.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); | |
var regexS = "[\\?&]" + param + "=([^&#]*)", | |
regex = new RegExp(regexS), | |
results = regex.exec(url); | |
if (results === null || (results && typeof(results[1]) !== 'string' && results[1].length)) { | |
return ''; | |
} else { | |
return decodeURIComponent(results[1]).replace(/\+/g, ' '); |
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
<section class="form"> | |
<input type="text" placeholder="xxx-xxx-xxxx"> | |
<button type="submit">Make my bookmarklet!</button> | |
</section> | |
<section id="bookmarklet-container"> | |
<span><p>Your link will be generated below and drag it to your toolbar!</p></span> | |
<div id="bookmarklet"> | |
</div> | |
</section> |
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 'rubygems' | |
require 'twilio-ruby' | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
class TwilioController < ApplicationController | |
TWILIO_ACCOUNT_SID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
TWILIO_ACCOUNT_TOKEN = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
SENDER_NUMBER = '+xxxxxxxxxx' |
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
{ | |
"name": "the-daily-koala", | |
"description": "automated lulz generator", | |
"version": "0.0.1", | |
"private": true, | |
"engines": { | |
"node": "0.8.x", | |
"npm": "1.1.x" | |
}, | |
"dependencies": { |
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
// Importing modules. | |
var express = require('express'); | |
var fs = require('fs'); | |
var image = require('./image'); | |
// Configuration. | |
var app = express(); | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use('/resources', express.static(__dirname + '/resources')); |
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 'twilio-ruby' | |
class InboxController < ApplicationController | |
BASE_URL = 'http://www.andyjiang.com/' | |
# /click-to-call-request | |
def click_to_call(calling_to) | |
# debugging purposes. | |
twilio_number = '4154444444' | |
calling_to = digits_only(calling_to) |
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
xml.instruct! | |
xml.Response do | |
xml.Gather(:action => @post_to, :numDigits => 1, :timeout => '10') do | |
xml.Say "Press a key to accept", :voice => :woman | |
end | |
xml.Say "You didn't press anything. Goodbye.", :voice => :woman | |
xml.Hangup | |
end |
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
xml.instruct! | |
xml.Response do | |
xml.Dial @calling_to, :callerId => @caller_id | |
end |
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
/** | |
* Generate a custom sort method for given starting `order`. After the given | |
* order, it will ignore casing and put periods last. So for example a call of: | |
* | |
* sorter('Overview'); | |
* | |
* That is passed: | |
* | |
* - Analytics.js |
OlderNewer