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
| #!/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) ------------------"; |
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
| 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 |