Skip to content

Instantly share code, notes, and snippets.

View ashokhein's full-sized avatar

Ashok Subramanian ashokhein

  • London
View GitHub Profile
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: sudo $0 /dev/sdh1"
exit 1;
fi
dd if=$1 of=/dev/null & pid=$!
while true; do
ps -p$pid --no-heading || break;
echo "-- $(date) ------------------";
@ashokhein
ashokhein / hello.js
Created March 9, 2017 12:32 — forked from planetoftheweb/hello.js
Simple Node.js Hello World
var http = require('http'); //add the http module
//Create a server
var myServer = http.createServer(function (request, response) {
// Return something from server
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello Node\n");
}); //create a server
Bind server to a port