Skip to content

Instantly share code, notes, and snippets.

var Q = require('q'),
twilio = require('twilio');
var accountVerification = require('../lib/helpers/accountVerification');
describe('accountVerification', function () {
var phoneNumbers, phoneNumbersGet, phoneNumbersGetDefer,
sendMessage, sendMessageDefer,
messages, messagesGet, messagesGetDefer;
beforeEach(function () {
// Mock LookupsClient API
@srveit
srveit / accountVerification.js
Last active January 30, 2024 02:08
File for sending and resending verification codes via Twilio's SMS API
var TWILIO_SID = '<Twilio-SID>',
TWILIO_TOKEN = '<Twilio-token>',
FROM_PHONE = '3143006228',
VERIFICATION_MESSAGE_INTRO = 'Your verification code: ',
TELE_PREFIX = '+1',
twilio = require('twilio'),
Q = require('q'),
_ = require('lodash');
@srveit
srveit / main.css
Created January 17, 2014 00:36
CSS for 4 div fixed ratio sample. place in same directory as index.html
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.parent {
background-color: #EEE;
}
.parent div {
@srveit
srveit / index.html
Last active January 3, 2016 12:59
Page with four divs with fixed ratios
!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Fixed Ratio Sample</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="parent">
<div class="image">
@srveit
srveit / nginx.conf
Created December 5, 2011 15:05
SSL nginx conf for SSL and latency testing
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@srveit
srveit / openssl.cnf
Created December 5, 2011 14:43
OpenSSL Configuration file with defaults
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
@srveit
srveit / gist:742636
Created December 15, 2010 21:28
CouchDB 1.1.x crash report
sveit@bartlett:/usr/local/var/lib$ sudo -u couchdb /usr/local/bin/couchdb
Apache CouchDB 1.1.0a09cd7a5-git (LogLevel=info) is starting.
[error] [<0.103.0>] {error_report,<0.31.0>,
{<0.103.0>,crash_report,
[[{initial_call,{couch_stats_aggregator,init,['Argument__1']}},
{pid,<0.103.0>},
{registered_name,[]},
{error_info,{exit,{{badmatch,{error,enoent}},
[{couch_stats_aggregator,init,1},
{gen_server,init_it,6},
@srveit
srveit / replace_assigns.sh
Created October 17, 2010 21:59
Replace occurrences of assigns[:name] = value with assign(:name, value)
for f in `grep -nH -rl assigns --include=*.rb .`
do sed -e 's/assigns\[\(:.*\)\] = \(.*\)$/assign(\1, \2)/' -i $f
done
@srveit
srveit / replace_response.sh
Created October 17, 2010 21:57
Replaces response. with rendered, in view specs to upgrade to RSpec 2
for f in `grep -nH -rl response --include=*.rb .`
do sed -e 's/response\./rendered./' -i $f
done
@srveit
srveit / replace_template.sh
Created October 17, 2010 21:54
Replaces occurrences of template. with view. in view specs
for f in `grep -nH -rl template --include=*.rb .`
do sed -e 's/template\./view./' -i $f
done