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
// GET /api/v1/cities/nsk/forecasts/current | |
// | |
// GET /api/v1/forecasts/current?city=nsk,berdsk | |
// | |
// GET /api/v1/forecasts/current?city=nsk,berdsk&fields=temperature,pressure&include=cities | |
{ | |
"metadata":{ | |
"resultset":{ | |
"count":10 | |
} |
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
// GET /api/v1/cities/nsk/forecasts/10days | |
// | |
// GET /api/v1/forecasts/10days?city=nsk,berdsk | |
// | |
// GET /api/v1/forecasts/10days?city=nsk,berdsk&fields=temperature,wind,cloud&include=cities | |
{ | |
"forecasts": [ | |
// прогноз на 00 часов 5 декабря для Новосибирска | |
{ | |
"date": "2013-12-05T00:00:00+0700", |
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
{ | |
"magnetic_storms": [ | |
{ | |
"date":"2013-12-05T00:00:00+0700", | |
"value":"small", | |
"title":"Небольшие возмущения" | |
}, | |
{ | |
"date":"2013-12-05T12:00:00+0700", |
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
# /api/v1/forecasts/current?city=nsk,berdsk | |
# /api/v1/forecasts/10days?city=nsk,berdsk | |
# /api/v1/forecasts/magnetic?city=nsk,berdsk | |
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
Base: | |
GET /api/v1/cities | |
GET /api/v1/cities/<alias> | |
GET /api/v1/forecasts/current?city=<city> | |
GET /api/v1/forecasts/10days?city=<city> |
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
{ | |
"request": { | |
"price": { | |
"type":"object", | |
"properties": { | |
"min": { | |
"type":"object", | |
"properties": { | |
"condition": { | |
"type": "string", |
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 cluster = require('cluster'); | |
var http = require('http'); | |
var dgram = require('dgram'); | |
var numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
// Fork workers. | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
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 cluster = require('cluster'); | |
var http = require('http'); | |
var dgram = require('dgram'); | |
var numCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { | |
// Fork workers. | |
for (var i = 0; i < numCPUs; i++) { | |
cluster.fork(); | |
} |
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
#!/bin/bash | |
if [ -z $1 ]; then | |
echo "" | |
echo "Usage:" | |
echo " dnpm <package>" | |
echo "" | |
echo "examples:" | |
echo " dnpm express@4.0.0" | |
echo "" |
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
#!/bin/bash | |
# wget "https://gist.githubusercontent.com/alekzonder/75d5a683d07adc0f4751951026148a46/raw" -O /usr/local/bin/install_package && chmod +x /usr/local/bin/install_package | |
name=$1 | |
releasesDir="/data/releases" | |
projectsDir="/data/projects" | |
tmpDir="/data/tmp" | |
if [ -z "$name" ]; then | |
echo 'no name' |
OlderNewer