Skip to content

Instantly share code, notes, and snippets.

View baringji's full-sized avatar

Jofil Inoc Baring baringji

View GitHub Profile
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@baringji
baringji / chmod.file.md
Last active August 29, 2015 14:00
Changing Linux file permission recursively.

find [directory] -type f -exec chmod 644 {} ;

@baringji
baringji / chmod.directory.md
Last active November 21, 2016 08:49
Changing Linux directory permission recursively.

find [directory] -type d -exec chmod 755 {} ;

@baringji
baringji / mysql.dump.md
Last active August 29, 2015 14:00
Create a MySQL dump using GNU zip (gzip).

mysqldump -u[username] -p[password] --add-drop-database -B [database] --opt | gzip -9 > filename.sql.gz

@baringji
baringji / mysql.restore.md
Last active March 24, 2022 17:48
Restore MySQL tar.gz file using GNU zip (gunzip)

gunzip < [backupfile.sql.gz] | mysql -u[username] -p[password] [database]