/etc/hosts
/Applications/MAMP/conf/apache/httpd.conf
/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
Open the Terminal then type sudo find
followed by a single space.
Drag your starting folder from any Finder window to the Terminal window (or use a forward slash "/" to indicate the system root for the whole system. Takes too much time. Not recommended).
Type -name
followed by a space and then the file name pattern you would like to search for .DS_Store
.
Type -delete
to have the command delete files.
Replace woo
with the product category slug of the category you need to exclude. Multiple categories can be excluded like this array( 'woo1', 'woo2', 'woo3' )
.
To exclude from another page, replace is_shop()
with is_page( 'YOUR_PAGE_SLUG' )
and enter your page slug in place of YOUR_PAGE_SLUG
.
Install Homebrew : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install gettext
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
command
+ shif
+ .
Upload zip file (ex. WordPress package) and extract.php to the same folder, then type the following:
http://path/to/extract.php?file=filename.zip
On success you will get "ZIP archive extracted" message.
function get_string_between($string, $start, $end){ | |
$string = " ".$string; | |
$ini = strpos($string,$start); | |
if ($ini == 0) return ""; | |
$ini += strlen($start); | |
$len = strpos($string,$end,$ini) - $ini; | |
return substr($string,$ini,$len); | |
} | |
$fullstring = "this is my [tag]dog[/tag]"; |
After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.
You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56
(or mysql57
depending on MySQL version).
You will find folders containing the database name, inside them you will find .frm
and .ibd
files. Take a copy of the entire folder for backup in another place, the desktop for example.