This file contains hidden or 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
//npm install express request mongodb connect-domain connect-mongodb | |
var request = require('request'), | |
express = require('express'), | |
connectDomain = require('connect-domain'), | |
http = require('http'); | |
var MongoStore = require('connect-mongodb'), | |
Db = require('mongodb').Db, | |
Server = require('mongodb').Server, |
This file contains hidden or 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
Date.fake(new Date(2019, 0 , 1)) | |
var a = new Date(); // Tue Jan 01 2019 00:00:00 GMT-0300 (ART) | |
Date.unfake(); | |
a.getTime() === new Date(2019, 0, 1).getTime() //true |
This file contains hidden or 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 salutator = { | |
name: 'jose', | |
greet: function(greeting, person) { | |
console.log(greeting + ' ' + person + '. ' + this.name + ' salutates you.'); | |
} | |
}; | |
salutator.greet('hello', 'Mark'); | |
//hello mark, jose salutates you. |
This file contains hidden or 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
/* | |
* Little example of how to use ```socket-io.client``` and ```request``` from node.js | |
* to authenticate thru http, and send the cookies during the socket.io handshake. | |
*/ | |
var io = require('socket.io-client'); | |
var request = require('request'); | |
/* | |
* This is the jar (like a cookie container) we will use always |
This file contains hidden or 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
prompt: Is this ok?: (yes) | |
info: Creating snapshot 0.0.0-40 | |
info Uploading: [=============================] 100% | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
warn: Error returned from Nodejitsu | |
error: Error: Unhandled error | |
error: at Object.onError (/root/nodejitsu/lib/nodejitsu.js:75:48) | |
error: at Router.invoke (/root/nodejitsu/node_modules/flatiron/node_modules/director/lib/director/router.js:359:18) | |
error: at /root/nodejitsu/node_modules/flatiron/node_modules/director/lib/director/router.js:47:9 |
This file contains hidden or 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
info: Creating snapshot 0.0.1-36 | |
info Uploading: [=============================] 99% | |
info: Updating app nodejs-workshop | |
info: Activating snapshot 0.0.1-36 for nodejs-workshop | |
info: Starting app nodejs-workshop | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error | |
error: There was an error while attempting to deploy the app | |
error: | |
error: Rackspace Error (404): Item not found |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Data.Services; | |
using System.Data.Services.Common; | |
using System.Linq; | |
namespace TestSingly | |
{ | |
public class SinglyServices : DataService<SinglyContext> | |
{ |
This file contains hidden or 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
{ | |
"_id": "26d6b393987a9346d98b8efe35065e83", | |
"_rev": "2-b317e63d8b2e4622be7aa59b95d2183f", | |
"status": "fail", | |
"payload": { | |
"pusher": { | |
"name": "none" | |
}, | |
"repository": { | |
"name": "workshopba", |
This file contains hidden or 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
info it worked if it ends with ok | |
verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe', | |
verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', | |
verbose cli 'install', | |
verbose cli 'ws', | |
verbose cli '-g' ] | |
info using [email protected] | |
info using [email protected] | |
verbose C:\Program Files (x86)\nodejs\\node.exe node symlink | |
verbose config file C:\Users\cs\.npmrc |
This file contains hidden or 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
for rate in 1..5 | |
.rate-{rate} | |
span:nth-child(-n+{rate})::after | |
content: "★" | |
span:nth-child(n+{rate+1})::after | |
content: "☆" |