Requires:
-
Homebrew (http://mxcl.github.io/homebrew/)
-
Ruby
Verify Homebrew is not sick:
brew doctor
update wp_posts | |
set post_content = replace(post_content,'’','\''); | |
update wp_posts | |
set post_content = replace(post_content,'…','...'); | |
update wp_posts | |
set post_content = replace(post_content,'–','-'); | |
update wp_posts | |
set post_content= replace(post_content,'“','"'); | |
update wp_posts | |
set post_content= replace(post_content,'â€','"'); |
## find hidden directories | |
find . -name '.*' -type d -print | |
## Change permissions recursively using FIND: | |
find /var/www/html/ -print -exec chmod <permissions> {} \; | |
find /var/www/html/ -print -exec chown <owner.group> {} \; | |
## For seLinux you should know wtf chcon does and modify appropriately. |
## Search for scary PHP stuff. | |
grep "((eval.*(base64_decode|gzinflate))|r57|c99|sh(3(ll|11)))" ./ -roE --include=*.php* |
# | |
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs | |
# just run "sudo trimforce enable" to activate the trim support from now on! | |
# | |
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
# | |
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
# | |
# Alternative to http://www.groths.org/trim-enabler-3-0-released/ |
Requires:
Homebrew (http://mxcl.github.io/homebrew/)
Ruby
Verify Homebrew is not sick:
brew doctor
<?php | |
/** | |
* Return an ID of an attachment by searching the database with the file URL. | |
* | |
* First checks to see if the $url is pointing to a file that exists in | |
* the wp-content directory. If so, then we search the database for a | |
* partial match consisting of the remaining path AFTER the wp-content | |
* directory. Finally, if a match is found the attachment ID will be | |
* returned. | |
* |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.