What is this? Every day I read a lot of articles about computer programming and languages, infrastructures, new technologies, quick tips, trends, architectures and so on. I read them immediately or put in my “read later” list. All my readings helped me to grow and learn new things…so why don’t share them with my readers? For this reason, I decided to publish and share, every monday, a list of the links I came accross during the past days.
Quickstart with Elasticsearch – link
I always wanted to try Elasticsearch but the time is never enough. I found this 5 minutes tutorial that is a good start point.
One quicker variant is to use the elasticsearch docker image to do all the tests. At this link you will find how, shortly:
docker pull docker.elastic.co/elasticsearch/elasticsearch:5.4.1 docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.4.1
Another thing to do, in all the example curl commands of the provided links you must add the authentication. For example, the command
curl -XPUT 'http://localhost:9200/blog/user/dilbert' -d '{ "name" : "Dilbert Brown" }'
must be changed in
curl --user elastic:changeme -XPUT 'http://localhost:9200/blog/user/dilbert' -d '{ "name" : "Dilbert Brown" }'
adding –user elastic:changeme (default user-password of the Elasticsearch docker image).
Enjoy
Chain of Responsibility Pattern – link
and why is different from the Decorator Pattern: link and link
Comment one line programmatically with sed
Quick tip: suppose we have this line in /etc/php5/cgi/php.ini file
disable_functions = pcntl_alarm,pcntl_fork
if we want to comment this line programmatically, simply do
sed -e '/disable_functions/ s/^;*/;/' -i /etc/php5/cgi/php.ini
That’s all for today’s LombaXMonday, if you liked it, have any question or want to let me know that this article sucks, don’t hesitate to add a comment 🙂