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
function mysql_real_escape_string (str) { | |
return str.replace(/[\0\x08\x09\x1a\n\r"'\\\%]/g, function (char) { | |
switch (char) { | |
case "\0": | |
return "\\0"; | |
case "\x08": | |
return "\\b"; | |
case "\x09": | |
return "\\t"; | |
case "\x1a": |
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
$username = ''; | |
$password = ''; | |
$strSql = "SELECT user_pass FROM wp_users WHERE user_login = '$username'"; | |
$result = mysql_query($strSql); | |
$row = mysql_fetch_array($result); | |
$encpass = $row['user_pass']; | |
if(!is_null($encpass)) { | |
include('classhash.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
git config --global merge.tool diffmerge | |
git config --global mergetool.diffmerge.cmd "diffmerge --merge --result=\$MERGED \$LOCAL \$BASE \$REMOTE" | |
git config --global mergetool.diffmerge.trustExitCode true | |
ln -s /Applications/DiffMerge.app/Contents/Resources/diffmerge.sh /usr/local/bin/diffmerge | |
git config --global mergetool.keepBackup false |
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
This is done by running the git update-index --assume-unchanged path/to/file.txt command. Once marking a file as such, git will completely ignore any changes on that file; they will not show up when running git status or git diff, nor will they ever be committed. | |
To make git track the file again, simply run | |
git update-index --no-assume-unchanged path/to/file.txt. | |
https://help.github.com/articles/ignoring-files |
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 ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib |
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/local/mysql/support-files/mysql.server start | |
sudo /usr/local/mysql/support-files/mysql.server stop | |
sudo /usr/local/mysql/support-files/mysql.server 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
Unable to locate svn binary | |
×:/usr/local/bin | |
○/Applications/Xcode.app/Contents/Developer/usr/bin/ |
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 update-index --assume-unchanged <file> | |
git update-index --no-assume-unchanged <file> |
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
pbcopy < ~/.ssh/id_rsa.pub |
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
Problem: TinyMCE rich-text editor disables the operating system spellchecker when using Firefox or Chrome. | |
Solution: Set the TinyMCE configuration “gecko_spellcheck” to TRUE. | |
tinyMCE.init({ | |
... | |
gecko_spellcheck : true | |
}); |
NewerOlder