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
ls * list file and directory | |
ls -l *long list file and directory , ll | |
ls -R *listing the file and directory with recurrsive. | |
ls -laR | |
pwd *present working direcory | |
cd dirname *enter a directory | |
cd.. back one directory cd - * to enter | |
cd ../.. *two level dir back | |
cd/ *root partition | |
cd and enter * to enter users home directory , "cd~" |
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
# ensure https | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
config -> vim /etc/nginx/nginx.conf | |
-> vim /usr/local/nginx/conf/nginx.conf | |
Reference https://linode.com/docs/web-servers/nginx/how-to-configure-nginx/ |
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
window.location.href = 'https://www.example.com'; |
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
//Start : Dynamic Title | |
add_filter('document_title_parts', 'filter_pagetitle',10); | |
function filter_pagetitle($title) { | |
$keyword = $_GET['mytitle']; | |
$check = !empty($keyword); | |
if($check) | |
$title['title'] = $keyword; |
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
cd /Applications/MAMP/Library/bin | |
./mysql -uroot -proot | |
connect your_database_name | |
source /path/to/your/file/sql_export.sql | |
///////////////// | |
$ mysqldump -u [uname] -p[pass] db_name > db_backup.sql |
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
ini_set('display_errors','Off'); | |
ini_set('error_reporting', E_ALL ); | |
define('WP_DEBUG', false); | |
define('WP_DEBUG_DISPLAY', false); | |
----------- | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_DISPLAY', true); |
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
<?php | |
$mageFilename = 'app/Mage.php'; | |
if (!file_exists($mageFilename)) { | |
echo $mageFilename." was not found"; | |
exit; | |
} | |
require_once $mageFilename; | |
Mage::app(); | |
try { |
OlderNewer