Posts

Web server - NGINX,APACHE

https://www.digitalocean.com/community/tutorials/apache-vs-nginx-practical-considerations

https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/


The Apache web server is the most popular web server in the world. This is in part due to its modular design. Apache 2 introduced Multi-Processing Modules, or MPMs. The MPMs change the basic functionality of the web server. They do this by modifying how Apache listens to the network, accepts, and handles requests. A lot of this functionality is rather technical and outside of the purview of this article. This article will briefly explain what the various MPMs are and how they work. For more detailed information on the various MPMs, please visit the Apache Documentation. Introduction All versions of Apache 2.0 and greater run some form of MPM, and there are a variety of MPMs for the various operating systems. This article will only be focusing on those available for the Linux operating system. First you’ll want to determ…

Learning Photoshop

1.cut image by pen tool
select by pen tool command + enter : make this selection to selector command + j : create a new layer from this selector

Learning Python

===python command==============================

django-admin help

virtualenv -p python3.5 my_env

bug:>> http://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting

source env/bin/activate

django-admin.py startproject tutorial

python manage.py startapp snippets == django-admin.py startapp tutorial python manage.py help

python manage.py shell python manage.py collectstatic

python manage.py createsuperuser

python manage.py runserver

django-admin compilemessages

rm -f tmp.db db.sqlite3 rm -r snippets/migrations python manage.py makemigrations snippets python manage.py migrate python manage.py test polls

>>install mysqlclient sudo apt-get install python-dev python3-dev sudo apt-get install libmysqlclient-dev pip install pymysql

pip install mysqlclient pip install -r requirements.txt pip freeze > requirements.txt

===elasticsearch command=======================

Leaning Rail

Image
rails otl:import
#install the latest version ruby https://askubuntu.com/questions/330072/how-to-find-and-install-latest-ruby-version-using-rvm https://rvm.io/rvm/install https://stackoverflow.com/questions/16626768/cant-install-ruby-on-rails-with-rvm-on-ubuntu-13-04
curl -L https://get.rvm.io | bash -s stable --ruby echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc

#when run rail must comment line below in vagrant config  #config.vm.synced_folder "./", "/vagrant",owner: "www-data", group: "www-data"
#config interpreter rubymine The point is to specify the path to gem set instead of ruby interpreter path. In my case it was: /home/vagrant/.rvm/gems/ruby-2.1.5 while the path to the interpreter was: /home/vagrant/.rvm/rubies/ruby-2.1.5/bin/ruby.

# create new project rails new appname -d mysql #ruby console irb #rails console rails console