Skip to content

Instantly share code, notes, and snippets.

View kwhinnery's full-sized avatar

Kevin Whinnery kwhinnery

View GitHub Profile

Twilio NodeCopter Prize

Much like rap, console gaming peaked in the 1990s. That's why Twilio's NodeCopter prize is the classic Nintendo 64 console!

http://s3.amazonaws.com/rapgenius/1338962167_Nintendo_64.png

Along with the console, the lucky winner(s) will receive an Expansion Pack (pre-installed), four controllers, and selection of classic games:

  • Goldeneye, the definitive multiplayer FPS
  • Perfect Dark
@kwhinnery
kwhinnery / Message.js
Created June 23, 2014 20:35
A basic structure for a CommonJS (node/browserify) AngularJS controller
// Require any dependencies in the node.js style (thanks Browserify!)
var buzz = require('node-buzz');
/*
The arguments to an Angular controller constructor are framework
APIs that are provided to your controller at runtime. This
is a technique for "dependency injection" in JavaScript. Note that
these argument names are significant! You can't change them without
making other configuration changes.
DocumentRoot "/home/action/workspace/myproject/public"
<Directory "/home/action/workspace/myproject/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "4.2.*",
"twilio/sdk": "3.*"
},
Route::match(array('GET', 'POST'), '/incoming', function()
{
$xml = '<Response><Say>Hello - your app just answered the phone. Neat, eh?</Say></Response>';
$response = Response::make($xml, 200);
$response->header('Content-Type', 'text/xml');
return $response;
});
Route::match(array('GET', 'POST'), '/incoming', function()
{
$twiml = new Services_Twilio_Twiml();
$twiml->say('Hello - your app just answered the phone. Neat, eh?', array('voice' => 'alice'));
$response = Response::make($twiml, 200);
$response->header('Content-Type', 'text/xml');
return $response;
});
<!doctype html>
<html>
<head>
<title>Send A Text</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>Send A Text!</h1>
@kwhinnery
kwhinnery / points.md
Last active August 29, 2015 14:06
iOS Device Sizes for App Developers

[UIScreen mainScreen].bounds.size.height reports the following sizes, in points, for these iOS devices:

iPad Air/Mini/etc. (some require @2x assets)
  • Height: 1024
  • Width: 768
iPhone 6 Plus (401ppi display requires @3x assets)
  • Height: 736
npm install twilio express body-parser
touch app.js
mkdir views
touch views/index.jade