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
##MySQL5 | |
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist | |
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist | |
Post navigation | |
##Apache | |
sudo apachectl -k restart |
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
##http://serverfault.com/questions/531685/proftp-on-macports-connection-refused | |
sudo /opt/local/etc/LaunchDaemons/org.macports.proftpd/proftpd.wrapper start |
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
# Basic grep example | |
grep -R "word" directory-of-choice/ | |
# basic find example | |
find inside-directory-x -name name | |
#or http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux | |
grep -rnw 'directory' -e "pattern" | |
# find word inside directory, exclude a direcory while looking for it and then only display files that | |
# contain that word | |
grep -nrl "gif;base64" domain.com --exclude-dir=domain.com/wp-content/cache |
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 killall -HUP mDNSResponder // https://discussions.apple.com/thread/4829348?tstart=0 | |
dscacheutil -flushcache //cache utility tool for OSX |
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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
#Original script https://github.com/shoestrap/shoestrap/wiki/Permissions | |
#Make sure you name this file whatever.sh and make it chmod 777 before executing it: bash whatever.sh | |
# |
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
// the following filetypes will not be executed | |
AddHandler cgi-script .php .pl .jsp .asp .sh .cgi | |
Options -ExecCGI |
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
#http://tools.dynamicdrive.com/password/ | |
AuthType Basic | |
AuthName "Graag twee keer login invoeren en daarna standaaard WordPress login" | |
AuthUserFile /path/to/file/.htpasswd | |
<Files wp-login.php> | |
Require valid-user | |
</Files> | |
#Dreamhost required this directive above WP directive |
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
//Go to databaase > wp options | |
//find row active_plugins | |
// remove all serialized data | |
//save et voila |
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
#make all files within a directory belong to a group | |
chmod g+s |
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
stat -c "%a %n" * | |
// -c is for file format, %a is for octal, %n is for file name | |
//http://geeklog.adamwilson.info/article/58/getting-file-permissions-in-octal-on-OS-X | |
//OSX Yosemite does not work with -c use: | |
stat -f '%A %a %N' * |