- ls (ls-l ,ls-a,h,r,t) pwd ssh cp -rf rm -rf cat head touch tail echo
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 express = require('express'); | |
var app = express(); | |
var http = require('http'); | |
var os = require('os'); | |
function generateHtml(response) { | |
var out = "<h2>FrontEnd Server " + os.hostname() + "</h2>"; | |
out += "<h2>Backend Server " + response.metadata.hostname + "</h2>"; | |
var jsonBooks = response.books; | |
out += "<table border = 1px ><tr><th>Author</th><th>name</th><th>Price</th></tr>"; |
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 express = require('express'); | |
var app = express(); | |
var os = require('os'); | |
var books = { | |
0: { 'name': 'book1', 'price': 0.0, 'author':'some' }, | |
1: { 'name': 'book2', 'price': 7.0, 'author':'person' }, | |
2: { 'name': 'book3', 'price': 9.0, 'author':'abc' }, | |
3: { 'name': 'book3', 'price': 9.0, 'author':'tahoor' }, | |
}; |
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
!#/bin/bash | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash | |
source ~/.bashrc | |
nvm install 7 | |
node --version | |
cd a | |
node app.js |
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
#!/bin/bash | |
today=`date "+%b%d.%H-%M"` | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 7 | |
node -e "console.log('Running Node.js ' + process.version)" >> /tmp/log.${today} |
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
Create VPC. | |
Add Subnet in that VPC,Only one Subnet in each availability zone. | |
Add Internet Gateway to VPC | |
Create Route-Table,Associate Subnet with route-table,Add internet gate to VPC |
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
#!/bin/bash | |
echo -n "Enter a number:" | |
read num | |
echo "Table for $num" | |
for counter in {1..10}; do | |
echo $num x $counter = $(( $num * $counter )) |
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
#!/bin/bash | |
numEnteredAsCommandLineArg=$1 | |
if [ -z $numEnteredAsCommandLineArg ]; then | |
echo -n "Enter a number:" | |
read num | |
else | |
num=$numEnteredAsCommandLineArg | |
fi |
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
#!/bin/bash | |
function showUsage() { | |
echo "you need to provide 2 numbers at command line, such that a < b and b-a < 5"; | |
exit; | |
} | |
a=$1 | |
b=$2 |
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
#!/bin/sh | |
for i in 1 2 3 4 5 | |
do | |
echo "Looping ... number $i" | |
done |
OlderNewer