Skip to main content

Posts

Showing posts from March, 2016

File Sharing From Unix Command Line

Transfer.sh is the beautiful service which allows you to share your files from Unix command line. you can upload your files via curl command.



Mongoose for Beginner

Mongoose is object modeling tool for mongodb and node js. that means you can define your data model in your code it self not in database.

This is how the mongoose schema look like, var UserSchema = new mongoose.Schema({
firstname:String,
lastname: String,
age: Number,
});
Mongoose allows you to define a schema of your data and use it in your code when you want.
Mongoose returns JSON object that you can use directly. Installing Mongoose on the Ubuntu Before you install mongoose on the machine we recommended you to install the prerequisites first. Update the systemsudo apt-get updateNodeJSsudo apt-get install nodejs
after installing nodejs you must check the version, it should be > v0.10.0 node --versionNPM NPM is the package manager for Node, which is automatically installed when you install the nodejs. so you need to check the version of the NPM  which should be > 0.6.3
npm --version
if it is not showing the version you can install it using the below command
sudo apt-get install npmMo…

Most Useful Linux Commands Alias

In linux “alias” command allows user to launch application or group of command using shortcut keyword on the terminal. alias is saved under ~/.bashrc file. to add alias there is two possible ways.

1. Update the ~/.bashrc file and add line like
alias apt-get=’sudo apt-get’ 2. using bash syntax
alias apt-get=’sudo apt-get’ Here are the list of most useful command alias which you can add in your linux machine and use it like a pro.