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
var hyperquest = require('hyperquest'); | |
module.exports = function downloadUtf8FileIntoString(url, cb) { | |
if (!url) return cb(new Error('url is required')); | |
var result = ''; // fixed scope | |
hyperquest(url) | |
.pipe(function (chunk, enc, tCb) { | |
result += chunk.toString('utf8'); // binary to utf8 | |
tCb(); | |
}) |
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
http://www.redargyle.com/blog/introduction-node-js-salesforce/ | |
https://github.com/jsforce/jsforce | |
https://www.npmjs.org/package/node-salesforce | |
https://www.npmjs.org/package/nforce | |
https://www.npmjs.org/package/salesforce-api |
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
anon@ubuntu:~/creepagram$ jitsu deploy | |
info: Welcome to Nodejitsu punkrider | |
info: jitsu v0.11.6, node v0.8.18 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in app.js | |
WARN package.json [email protected] No README.md file found! | |
WARN package.json [email protected] No README.md file found! | |
WARN package.json [email protected] No README.md file found! | |
WARN package.json [email protected] No README.md file found! |
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
/** | |
* Handout design for iPad app | |
*/ | |
div { | |
font-family:Arial; | |
} | |
div.main .handout { | |
height:30px; |
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
// node.js proxy server example for adding CORS headers to any existing http services. | |
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities | |
var httpProxy = require('http-proxy'), | |
express = require('express'); | |
var proxy = new httpProxy.RoutingProxy(); | |
var proxyOptions = { | |
host: '192.168.3.11', |
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
if ( is_page("quizzes") ) { | |
echo "quizzes"; | |
} | |
else if ( is_page("course-management") ) { | |
echo "course-management"; | |
} | |
else if ( is_page("online-learning") ) { | |
echo "online-learning"; | |
} | |
else if ( is_page("sell-your-courses") ) { |
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
var obj1 = obj2 = {}; obj1 == obj2; | |
true | |
var obj1 = obj2 = {}; obj1 === obj2; | |
true | |
var obj1 = {}; var obj2 = {}; obj1 === obj2 | |
false | |
var obj1 = {}; var obj2 = {}; obj1 == obj2 | |
false |
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
anon@ubuntu:~/creepagram$ jitsu deploy | |
info: Welcome to Nodejitsu | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing your application dependencies in app.js | |
warn: Local version appears to be old. | |
warn: Your package.json version will be incremented for you automatically. | |
warn: About to write /home/anon/creepagram/package.json | |
data: | |
data: { |