Skip to content

Instantly share code, notes, and snippets.

View AshuJoshi's full-sized avatar

Ashu Joshi AshuJoshi

View GitHub Profile
@AshuJoshi
AshuJoshi / IoTPlatformLookUp,js
Created May 5, 2016 18:38
Nodejs Script for DNS Lookup of IoT Cloud Platforms
var dns = require('dns');
function getIPAddresses(hostName){
dns.resolve4(hostName, function (err, addresses) {
if (err) throw err;
//console.log('Addresses: ' + JSON.stringify(addresses) );
addresses.forEach(function (a) {
dns.reverse(a, function (err, domains) {
if (err) {
@AshuJoshi
AshuJoshi / tcpSocketServer.js
Created July 24, 2015 23:07
A Simple TCP Socket Server using Node.js
/*
Simple Node.js TCP Socket Server
Author: Ashu Joshi
*/
"use strict'";
const SERVER_PORT = 10000;
const
net = require('net'),
server = net.createServer(function (connection) {
@AshuJoshi
AshuJoshi / VMstart.sh
Last active September 7, 2021 06:34
Launch VMWare Fusion with NO GUI
# How to launch (and suspend) VMWare Fusion Guest OS without a GUI, using command line
# Start a Virtual Machine with NO GUI
# Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]
# vmrun - Command Line VMWare Fusion tool
# -T option is to specify hostType
# fusion (this is the hosttype)
# start (command to start)
# followed by path to the VMX
# nogui - to specify to launch silently, without GUI