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
git stash save --keep-index |
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
wget -bqc http://path-to-url/linux.iso | |
ps aux | grep wget |
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
grep -Ril "text-to-find-here" /path | |
find -name 'filename' | |
find . -name '*.js' -exec grep -i 'string to search for' {} \; -print | |
tar -czvf media/bk.tar.gz ./ --exclude="media/*" --exclude="var/*" --exclude="v/*" --exclude="errors/*" | |
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
add_action('wp_ajax_dynamic_delete', 'delete_csv'); | |
function delete_csv(){ | |
header( "Content-Type: application/json" ); | |
$input = filter_input_array(INPUT_POST); | |
echo json_encode($input); | |
exit(); | |
} |
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 { |
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
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
//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; |