count rows
SELECT COUNT(column_name) FROM table_name;
git show commithash | |
git log --author=name | |
git log --grep=word | |
(undo last commit) | |
git reset --soft HEAD~1 | |
(ammend last commit message) |
Local mac: npm install --production
sudo echo node_modules > .gitignore git init git add . git commit -m 'Initial commit'
heroku create app-name
Mac keyboard shortcut: https://support.apple.com/en-us/HT201236
Atom editor cheat sheet: http://sweetme.at/2014/03/10/atom-editor-cheat-sheet/
Atom editor cheat sheet: http://blog.bugsnag.com/atom-editor-cheat-sheet
Python 2.7 django pip install django
to use mysql
pip install MySQL-Python
or maybe pip install mysqlclient
database example:
http://www.craigderington.me/deploying-django-mariadb-nginx-and-gunicorn-on-ubuntu-14-04/
sudo apt-get update sudo apt-get install python-pip python-dev mysql-server libmysqlclient-dev nginx
follow up until homebrew - http://railsapps.github.io/installrubyonrails-mac.html install python the right way - http://docs.python-guide.org/en/latest/starting/install/osx/
https://www.elastic.co/downloads/past-releases/elasticsearch-1-7-6 https://www.elastic.co/downloads/past-releases/kibana-3-1-2
Get started: cd /path/to/archive tar elasticsearch (do the same for kibana) -zxvf elasticsearch-2.1.0.tar.gz (do the same for kibana) cd elasticsearch-1.7.6/config vi elasticsearch.yml Add http.cors.enabled: true To start elasticsearch, cd bin
grep something from text file:
grep "phrase-here" production.log; tail -f production.log