Execute following commands.
npm install -g npm-check-updates
ncu -u
npm install
Execute following commands.
npm install -g npm-check-updates
ncu -u
npm install
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get install libreoffice
Install sun java 8 on ubuntu
Using docker containers in Windows(host) for react and webpack so that workspace has linux like feel. To do so mounting the workspace directory in container, so coding is done in atom on Windows while server is running in docker. But issue is that changes done in host folder files are not reflected and not reloaded by webpack, so created a small trick to reload changes by webpack.
Include above 2 files in project, and install the required dependencies by these files.
fileWatcherLocal.js
will listen the change on Windows and same it'll notify to the fileWatcherServer.js
server.
fileWatcherServer.js
listen the changed file path sent by fileWatcherLocal.js
and executes chmod
command to notify webpack.
fileWatcherLocal.js
must be run in host (my case Windows).
mongodump -h xxx11.mlab.com:11 -u user -p password --authenticationDatabase release-db -d release-db -o /home/dumps
**Options** `-h`: mlab host:port, `-u`: db user, `-p`: db user password, `--authenticationDatabase` `-d`: mlab dbname, `-o`: path to store backupfiles
restore command, to restore locally
mongorestore --db dname /home/dumps
Otherwise to restore in mlab, create a new db and replace the options
{ | |
"plugins": [ | |
"react" | |
], | |
"extends": "airbnb", | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
module.exports = function (Customer) { | |
Customer.getter['fullname'] = function () { | |
return `this.firstName this.lastName`.trim() | |
}; | |
}; |
#!/bin/sh | |
# option 2: paste this into user-data to automate install via boot script | |
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours | |
# renames the host to have a suffix of alexellisio | |
export original=$(cat /etc/hostname) | |
sudo hostname $original-master-alexellisio | |
echo $original-master-alexellisio | sudo tee /etc/hostname | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart always portainer/portainer -H unix:///var/run/docker.sock |