Skip to content

Instantly share code, notes, and snippets.

View developeryashraj's full-sized avatar

Yashrajsinh Jadeja developeryashraj

  • Digicorp
  • Ahmedabad, India
View GitHub Profile
@developeryashraj
developeryashraj / installing-postman.md
Last active December 7, 2019 06:09 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Go to Download folder -> "right click" -> "Open in Terminal"

Installing Postman (Verify your version of file in below command)

tar -xzf Postman-linux-x64-7.13.0.tar.gz

If any version is installed before, remove it.

@developeryashraj
developeryashraj / mqtt-multi-redis.js
Created December 13, 2018 12:29
MQTT node cluster with redis
let config = {
"mqtt": {
"port": 1883,
"http_port": 1884
}
};
//https://github.com/mcollina/ascoltatori
var ascoltatore = {
type: 'redis',
@developeryashraj
developeryashraj / single-multi-socket-publish.js
Last active December 13, 2018 12:26
Socket.IO with MQTT on Node. Single Threaded Vs Multi Threaded
let SocketPublishIO_Single = function (topic_or_room, data) {
if (io.sockets.adapter.rooms[topic_or_room]) { // if room is available then emit in the room rather doing broadcast
// console.log("Emitting to socket room ",topic_or_room);
io.to(topic_or_room).emit(topic_or_room, data);
} else {
// No room. Do broadcast.
// console.log("Emitting without room ",topic_or_room);
io.emit(topic_or_room, data);
}
}
@developeryashraj
developeryashraj / node-ubuntu-install.md
Last active August 23, 2018 02:53
Installing Node on Ubuntu using tar.xz binary

Install Node js from .tar.xz

  • Download latest version of node from https://nodejs.org/en/

  • Run below command to install node. Do change file name with your downloaded file.

sudo tar -C /usr/local --strip-components 1 -xf node-v8.11.4-linux-x64.tar.xz