The following scripts assist in purging and stopping the build up of binary logs by MySQL see http://technology.blue-bag.com/binary-logs-are-filling-my-mac-help
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 | |
/** | |
* @file | |
* Omega theme implementation to display a block for the FacetAPI Facet Block. | |
* FacetAPI Search facets display block | |
*/ | |
?> | |
<?php $tag = $block->subject ? 'section' : 'div'; ?> | |
<<?php print $tag; ?><?php print $attributes; ?>> |
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
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache | |
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Techniques in here adapted from all over, including: | |
# Kroc Camen: camendesign.com/.htaccess | |
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
# Sample .htaccess file of CMS MODx: modxcms.com |
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
/** | |
* Create a custom module and implement hook_ds_fields_info to surface your 'field' to DS | |
* Create a custom theme function to create the content when called by DS | |
* | |
* | |
*/ | |
function yourmodule_ds_fields_info($entity_type) { | |
$fields = 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
#!/bin/bash | |
# usage: drupal-quick-dump user host database | |
USER="$1" | |
HOST="$2" | |
DB="$3" | |
DATE=`date +%Y%m%d` | |
# Get User Password | |
echo "Please provide the password for ${USER} on db ${DB} hosted at ${HOST}:" |
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
rem refer to http://perplexed.co.uk/271_batch_mysqldump_useful_development_tool.htm | |
@echo off | |
echo. | time /t | |
echo Dump local database . | |
SET /P dbname=Name of database?: | |
SET tmp_file=d:\wamp\dump\%dbname%.sql | |
echo Dumping %dbname%@LocalHost ... | |
D:\wamp\bin\mysql\mysql5.5.8\bin\mysqldump.exe -h localhost -uroot -p %dbname% > %tmp_file% | |
rem "d:\program files\winzip\wzzip" -a -m %tmp_file%.zip %tmp_file% | |
gzip -9 %tmp_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
#!/bin/bash | |
# | |
# Lock down a Drupal site's file permissions | |
# | |
# I have adapted this from Vivek Gite | |
# Adapted to add Drupal specific: www-data (apache users) to own | |
# default/files and settings.php and have rights to write to files | |
# | |
# | |
# Vivek Gite: Header |
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 example shows how to deny access to individual and ranges of IP address | |
## Typically indentified as spammers | |
## Taken from http://perishablepress.com/stupid-htaccess-tricks/ | |
##Deny from multiple single IPs | |
SetEnvIfNoCase REMOTE_ADDR ".*(5.167.182.32|125.79.65.108|178.137.83.159|184.154.149.194|192.210.62.162).*" BlockedAddress | |
SetEnvIfNoCase REMOTE_ADDR ".*(94.23.20.123|92.243.84.187|58.61.239.201).*" BlockedAddress | |
#deny from a range e.g. 91.236.74.0/24 |
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
/** | |
* Get a list of Mollom entries from the Drupal Watchdog | |
* summarised by IP address | |
*/ | |
SELECT hostname, count(wid) | |
FROM `watchdog` | |
where type = 'mollom' and message like 'Spam%' | |
group by hostname | |
order by count(wid) desc |
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
<?xml version="1.0"?> | |
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> | |
<cross-domain-policy> | |
<site-control permitted-cross-domain-policies="none"/> | |
</cross-domain-policy> |
OlderNewer