This file contains 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
CREATE DATABASE new_database; | |
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'new_password'; | |
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_user'@'localhost'; | |
FLUSH PRIVILEGES; |
This file contains 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
DROP TRIGGER IF EXISTS your_trigger_name; | |
DELIMITER $$ | |
CREATE TRIGGER your_trigger_name | |
AFTER INSERT ON your_table_name FOR EACH ROW | |
BEGIN | |
... | |
END$$ | |
DELIMITER; |
This file contains 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
- apachectl configtest (check your Apache config files for any errors before restarting, because Apache will not start again if your config files have syntax errors) | |
- apachectl restart | |
- a2ensite [site] | |
- a2dissite [site] | |
- service apache2 reload | |
- service apache2 restart | |
- service apache2 stop | |
- service apache2 start |
This file contains 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
passenger-status | |
passenger-memory-stats |
This file contains 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
SET NAMES utf8; | |
SET CHARACTER SET utf8; |
This file contains 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
/etc/logrotate.conf | |
/etc/logrotate.d/... | |
/home/deploy/APPNAME/current/log/*.log { | |
daily | |
missingok | |
rotate 7 | |
compress | |
delaycompress | |
notifempty |
This file contains 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 openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt | |
The most important line is "Common Name". Enter your official domain name here or, if you don't have one yet, your site's IP address. | |
https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04 |
This file contains 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
sed '/Find this text and remove everything that follows/q' filename > new_filename |
This file contains 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
require 'active_support/core_ext' | |
Time.now + 2.days |
This file contains 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
vim .barchrc | |
export VISUAL=vim |
OlderNewer