Skip to content

Instantly share code, notes, and snippets.

View heymichaelp's full-sized avatar

Michael Phillips heymichaelp

View GitHub Profile
[warning] Connection error occurred. Waiting for 1975 ms before retrying...
Error: Request failed with status code 504
at createError (/Users/mphillips/Projects/to-taste/node_modules/contentful/dist/contentful.node.js:703:15)
at settle (/Users/mphillips/Projects/to-taste/node_modules/contentful/dist/contentful.node.js:788:12)
at IncomingMessage.handleStreamEnd (/Users/mphillips/Projects/to-taste/node_modules/contentful/dist/contentful.node.js:3025:11)
at emitNone (events.js:120:20)
at IncomingMessage.emit (events.js:218:7)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
@heymichaelp
heymichaelp / tendril.html
Created April 28, 2015 21:11
Testing HTML page for Tendril Widgets
<html>
<head></head>
<body></body>
</html>
@heymichaelp
heymichaelp / gistify306261.js
Created September 16, 2014 22:03
s3xy-node implementation
app.get('/sign_s3', function(req, res){
var object_name = req.query.s3_object_name;
var mime_type = req.query.s3_object_type;
var now = new Date();
var expires = Math.ceil((now.getTime() + 10000)/1000); // 10 seconds from now
var amz_headers = "x-amz-acl:public-read";
var put_request = "PUT\n\n"+mime_type+"\n"+expires+"\n"+amz_headers+"\n/"+S3_BUCKET+"/"+object_name;
https://devcenter.heroku.com/articles/s3-upload-node
https://devcenter.heroku.com/articles/s3-upload-node
~/Projects/neighborhood-centers (s3xy-adjustments) $ brew install phantomjs
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/phantomjs-1.9.7_1.mountain_lion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring phantomjs-1.9.7_1.mountain_lion.bottle.tar.gz
🍺 /Users/michaelphillips/Developer/Cellar/phantomjs/1.9.7_1: 104 files, 34M
{
"meta": {
"name": "NextGenJane"
},
"quizQuestions": [
{
"id": 1,
"description": "What best describes your health habits?",
"type": "gridWithText",
"choiceType": "single",
{
"name": "nextgenjane-staging",
"version": "0.1.0-3",
"private": true,
"scripts": {
"prestart": "grunt prestart",
"start": "node server/boot.js"
},
"engines": {
"node": "0.10.15"
Michaels-MacBook-Air:nextgenjane michaelphillips$ jitsu -v
0.13.18
Michaels-MacBook-Air:nextgenjane michaelphillips$ node -v
v0.10.15
Michaels-MacBook-Air:nextgenjane michaelphillips$ npm -v
1.4.6