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
Server : mqtt://iot.eclipse.org | |
Time : 2016-12-22T18:36:12.101Z | |
Messages: 178.51666666666668 per second | |
Average topic size: 28.958920735692278 bytes | |
Average payload size: 121.65670805713752 bytes | |
Date size: 24 bytes | |
Total time: 60.289 seconds | |
------------------ | |
Server : mqtt://test.mosquitto.org | |
Time : 2016-12-22T18:38:14.669Z |
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
const mqtt = require('mqtt'); | |
const ES = require('esta'); | |
const INDEX = 'mqtt', | |
TYPE = 'eclipse'; | |
let counter = 0, | |
errors = 0; | |
ES.CONNECT(INDEX, () => { |
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
const elasticsearch = require('elasticsearch'); | |
const mqtt = require('mqtt'); | |
const chalk = require('chalk'); | |
const jsonSize = require('json-size'); | |
const ProgressBar = require('ascii-progress'); | |
const memwatch = require('memwatch-next'); | |
const os = require('os'); | |
const INDEX = 'mqtt', | |
TYPE = 'eclipse', |
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
const Twitter = require('twitter'); | |
const client = new Twitter({ | |
consumer_key: 'XYZ', | |
consumer_secret: 'XYZ', | |
access_token_key: 'XYZ-XYZ', | |
access_token_secret: 'XYZ' | |
}); | |
const params = { |
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
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs | |
cd | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
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
<template> | |
<item v-for='item in hn.topStories' :key='item.id' :item='item'> | |
</item> | |
</template> | |
<style> | |
// ... | |
</style> | |
<script> |
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
[ | |
{ | |
"paths": ["nord"], | |
"name": "Fontaine Du Temple", | |
"coordinates": { "latitude": "43.726072", "longitude": "7.255815" }, | |
"stopId": "1914", | |
"isPickup": true | |
}, | |
{ | |
"paths": ["nord"], |
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
import axios from "axios"; | |
export const download = async (uuid) => { | |
const { data } = await axios({ | |
url: `/api/download/${uuid}`, | |
method: "GET", | |
responseType: "blob", | |
}); | |
const blob = new Blob([data], { | |
type: "application/pdf", |
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 fs = require("fs"); | |
var xml2js = require("xml2js"); | |
var argv = require("yargs") | |
.alias("d", "dir") | |
.alias("o", "out").argv; | |
var INPUT_DIRECTORY = "./"; | |
var OUTPUT_FILE = INPUT_DIRECTORY + "merged/checkstyle.xml"; |
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
let Matrix = []; | |
const fillMatrix = (m, size) => { | |
for (let index = 0; index < size; index++) { | |
m[index] = Array(size).fill(false); | |
} | |
}; | |
const getCellSafe = (i, j) => { | |
if (Matrix[i] && Matrix[i][j]) return Matrix[i][j]; |