$ sudo apt-get update
$ sudo apt-get install nodejs
$ node -v
$ npm -v
###Visual Studio Code
CMD+P for search file in directory
| sudo mongod --configsvr --replSet csr --dbpath data/db/ --port 27019 --logpath /var/log/mongodb/mongod.log --bind_ip 0.0.0.0 --fork | |
| rs.initiate({ | |
| _id: "csr", | |
| configsvr: true, | |
| members: [ | |
| { _id: 0, host : "10.128.0.44:27019"}, | |
| { _id: 1, host : "10.128.0.45:27019"}, | |
| ] | |
| }) |
| var message = 'a quick brown fox jumps over the lazy dog' | |
| const splited = _.split(message, ' ') | |
| var keywords = [] | |
| _.forEach(splited, (item, index) => { | |
| for(var i = 0; i < splited.length ; i++) { | |
| var data = _.take(splited, i + 1) | |
| data = _.join(data, ' ') | |
| keywords.push(data) | |
| console.log(data) |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt-get update | |
| sudo apt install php7.2-common php7.2-cli php7.2-gd php7.2-mysql php7.2-curl php7.2-intl php7.2-mbstring php7.2-bcmath php7.2-imap php7.2-xml php7.2-zip | |
| curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer |
| Commits count by author: git shortlog -s -n --all --no-merges | |
| All insertions and deletions by author: git log --shortstat --pretty="%cE" | sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}' |