Wednesday, November 29, 2017

Elastic search start stop

Start
sudo service elasticsearch start
Stop
sudo service elasticsearch stop

Thursday, October 5, 2017

Tuesday, September 12, 2017

copy content of folder to another folder

see what owner of files is (for sake).

sudo cp -a /source/. /dest/
this should copy all files and in my case assign right owner.
If not cd to the dest folder and use

sudo chown www-data:www-data *

Nginx test && reload

sudo nginx -t && sudo nginx -s reload

Thursday, August 17, 2017

Friday, June 23, 2017

How to remove permanently last commit from git remote

To only remove commit but save current code use:

git reset --soft HEAD~1
...make new commit and then
git push origin master --force


To remove commit and remove commit's code use:

git reset --hard HEAD~1
git push origin master --force