This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
send(:_layout) gives current layout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/rake erd attributes="foreign_keys, primary_key, inheritance" inheritacne=true notation=bachman polymorhism=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install redis-server | |
# It's optional. It gives redis-cli tool among others. | |
sudo apt-get install redis-tools | |
# Start/Stop/Restart/Status redis server | |
sudo service redis-server [start|stop|restart|status] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://jafty.com/blog/restoring-postgresql-database-with-pg_restore/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add row to /etc/hosts | |
# Format is: | |
# ipaddress hostname | |
# Example: | |
16.18.11.156 www.google.com | |
# This way whenever you type www.google.com it go to 16.18.11.156 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gitk -L36,36:app/models/user.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To restart nginx type: | |
nginx -t reload | |
# For more options: | |
# http://www.rootr.net/man/man/nginx/8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- To mark database 'applogs' as not accepting new connections: | |
update pg_database set datallowconn = false where datname = 'TARGET_DB'; | |
/* Query pg_stat_activity and get the pid values you want to kill, | |
then issue SELECT pg_terminate_backend(pid int) to them. */ | |
SELECT pg_terminate_backend(pg_stat_activity.pid) | |
FROM pg_stat_activity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Додавање корисника jerry у постојећу групу ftp: | |
usermod -a -G ftp jerry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Инсталација Рубија и Реилс окружења на Убунту | |
Пре инсталације Рубија: | |
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \ | |
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 \ | |
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison \ | |
subversion g++-4.7 libmagickwand-dev | |
Инсталација g++-4.7 | |
Уколико на званичним серверима дистрибуције не постоји g++-4.7 онда је потребно додати неки сервер у коме се он налази. На пример: |