π»π³
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
openssl x509 -req -in your_file.csr -signkey your_file.key -out your_file.crt |
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
Remove sendmail | |
# yum remove sendmail | |
------------------------------------ | |
Install Postfix | |
# yum install postfix | |
------------------------------------ | |
Configure Postfix | |
# vim /etc/postfix/main.cf |
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
# Some of URLs were crawled by Google with "index.php". Redirect "bad" URLs .../index.php to correct once .../, without index.php | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] | |
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L] |
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
# Condition | |
SetEnvIf Request_URI ^/your_secure_path auth=1 | |
# Basic Authen | |
AuthName "Basic Auth" | |
AuthType Basic | |
AuthUserFile "/path/to/my/.htpasswd" | |
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
### Keybase proof | |
I hereby claim: | |
* I am daubac402 on github. | |
* I am daubac402 (https://keybase.io/daubac402) on keybase. | |
* I have a public key ASAdoYrKDbbygnnrNlNnHEfLK68cqY6iKZn-ece6UosGBwo | |
To claim this, I am signing this object: |
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
0. Do this step 1 time only | |
vim /your_laradock_location/apache2/Dockerfile, add these line before the "COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf" line and "ENTRYPOINT" line: | |
RUN mkdir /etc/apache2/ssl/ | |
COPY ssl /etc/apache2/ssl/ | |
---- | |
1. Prepare your cert, key, ca files for your site at: /your_laradock_location/apache2/ssl/your_site/your_files | |
2. In your config file at host: /your_laradock_location/apache2/sites/your_site.conf, add to "<VirtualHost *:443>": | |
SSLCertificateFile /etc/apache2/ssl/your_site/your_crt.crt |
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
1. vim /your_laradock_location/apache2/Dockerfile, add this before "COPY vhost.conf /etc/apache2/sites-enabled/vhost.conf" and ENTRYPOINT line: | |
RUN a2enmod include | |
RUN service httpd restart | |
2. Rebuild apache2 image (at your_laradock_location) | |
docker-compose build --no-cache apache2 | |
3. docker-compose up -d apache2 mysql phpmyadmin workspace |
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
a) (This needs to be done only once at first) | |
Configure Calibre to remove 'font-family' style element during conversion: | |
In Calubre, | |
--> "Preferences" | |
--> "Convertion > Common Options" | |
--> "Look & Feel" | |
--> "Styling" tab | |
--> in "Filter Style Information" | |
--> check "Fonts" checkbox |
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
<?php | |
$str = 'ID VARCHAR2(5) not null | |
NAME VARCHAR2(50), | |
ADDRESS VARCHAR2(200), | |
TEL VARCHAR2(30), | |
FAX VARCHAR2(30)'; | |
function db_column($field) { |
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
1. Check current defrag status: | |
SQL> select table_name,round(data_length/1024/1024) as data_length_mb, round(data_free/1024/1024) as data_free_mb from information_schema.tables order by data_free_mb; | |
2. Optimize one table or multi: | |
SQL> OPTIMIZE TABLE your_table_name; | |
SQL> OPTIMIZE TABLE your_table_name1, your_table_name2, your_table_name3; | |
(or) | |
Optimize all of your tables in "your_database": | |
(from bash, not in mysql client bash) |