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 . -name ".svn" -type d -exec rm -rf {} \; |
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
if (navigator.userAgent.indexOf('Mac OS X') != -1) { | |
$("body").addClass("mac"); | |
} else { | |
$("body").addClass("pc"); | |
} |
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
$ readlink -f /home |
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
.prevent-text-breakouts { | |
-ms-word-break: break-all; | |
word-break: break-all; | |
word-break: break-word; | |
-webkit-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} |
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
// NOT SECURE | |
mysqldump -u username --no-data dbname | grep ^DROP | mysql -u username | |
// SECURE | |
mysqldump -u username -p --no-data dbname | grep ^DROP > drop.sql | |
mysql -u username -p dbname < drop.sql |
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 . -name "*" -exec grep -l "somestring" {} \; |
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
mysql -u username -p -h localhost DATA-BASE-NAME < data.sql |
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
menu_rebuild(); | |
drupal_flush_all_caches(); | |
die(); |
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
// replace string and update | |
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]'); |
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
/** | |
* Original post: http://www.thebigblob.com/how-to-restrict-user-access-to-content-in-folders-using-php-and-apache-htaccess-files/ | |
*/ | |
# The .htaccess file | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} ^\/(path\/to\/some\/folder|dummy)\/.*$ | |
RewriteRule !^((.*.php)|(.*\/))$ authorize.php |
OlderNewer