Hello World from GitHub
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
| hey there! |
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
| const _ = require('lodash') | |
| const components = { | |
| blaster: { | |
| tasks: [ | |
| { name: 'ystanovka_lazera_blastera_v_korpus', worker: 'shturmoviki' }, | |
| { name: 'polirovka_rukoyati_blastera', worker: 'sborshiki' }, | |
| { name: 'zaryad_batarey_blastera', worker: 'akkumulyatori' }, | |
| { name: 'pristrelka', worker: 'shturmoviki' } | |
| ], |
curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/logincurl -XGET 'http://127.0.0.1:8000/api/some' -H 'Authorization: JWT <some_token>'
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
| getAPIKeys () { | |
| const esClient = new ElasticSearch.Client({ host: 'http://nightly.apinf.io:14002' }); | |
| const params = { | |
| size: 10, | |
| body: { | |
| sort: [ | |
| { | |
| request_at: { | |
| order: 'desc', | |
| }, |
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
| const fs = require('fs') | |
| var walk = function (dir, done) { | |
| fs.readdir(dir, (error, list) => { | |
| if (error) { | |
| return done(error) | |
| } | |
| let i = 0; |
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
| migrate () { | |
| this.notify.info('success') | |
| axios.get(`http://127.0.0.1:1337/servers?limit=1000`) | |
| .then(res => { | |
| const servers = res.data | |
| this.notify.info('Success', `Found ${servers.length} servers.`) | |
| _.forEach(servers, server => { | |
| this.apiServers.add(server) | |
| .then(res => console.log(res)) | |
| .catch(err => console.error(err)) |
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
| import moment from 'moment' | |
| import es from 'elasticsearch' | |
| import uuid from 'node-uuid' | |
| import _ from 'lodash' | |
| import config from '/config' | |
| const client = new es.Client({ | |
| host: config.host | |
| }) |
server {
listen 80;
server_name <public_IP>;
location / {
proxy_pass http://localhost:18083;
proxy_http_version 1.1;
NewerOlder