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
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,'â€','"'); |
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
## 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. |
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
## Search for scary PHP stuff. | |
grep "((eval.*(base64_decode|gzinflate))|r57|c99|sh(3(ll|11)))" ./ -roE --include=*.php* |
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
// Change the editor to vi | |
export SVN_EDITOR=vi | |
// Invoke property editor to do things like ignore .sass-cache directories. You can the ignore options line by line. | |
svn propedit svn:ignore . |
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
-- (all?) So your Ruby Gems hate you because there is no gcc in the right place? | |
You've upgraded Xcode Right? | |
You've installed the Command Line Tools under Xcode > Preferences > Downloads right? | |
Did you lie, cheat, and steal by doing: ln -s /usr/bin/gcc /usr/bin/gcc-4.2? -- Who the hell wants to compile against a version specific compiler anyway? | |
-- (mavericks) So your git svn is broken, try fixing the perl linking. | |
sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.16/darwin-thread-multi-2level/SVN /System/Library/Perl/Extras/5.16/SVN | |
sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.16/darwin-thread-multi-2level/auto/SVN/ /System/Library/Perl/Extras/5.16/auto/SVN |
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
/** | |
* FNBX HTML Tag | |
* | |
* Core utility function for the writing and manipulation of HTML tags. | |
* | |
* @since 1.0 | |
* @echo string | |
*/ | |
if ( !function_exists( 'fnbx_html_tag' ) ) { | |
function fnbx_html_tag( $html = array() ) { |
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 | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* takes to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
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
sudo /usr/bin/dscl . -append /groups/wheel GroupMembership <USERNAME> |
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
# Rsync command to mirror, delete, with excludes over ssh on a weird port | |
rsync -avz --delete --exclude *backups --exclude ERROR_LOG* -e 'ssh -p 2222' [email protected]:/from-location/ [email protected]:~/tolocation/ |
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
/** | |
I still live in SVN land and move my svnX application preferecnes between workstations. OSX Mavericks 10.9.x makes this complicated since it uses a blind broken & bitter old man as a preference daemon. Sometimes you can get it drunk and this works. | |
*/ | |
defaults read ~/this-is-my-new-pref-file.whatever | |
defaults read com.runnaway-app-and-old-daemon-hater (maybe) |
OlderNewer