Skip to content

Instantly share code, notes, and snippets.

View iAugur's full-sized avatar

George Boobyer iAugur

View GitHub Profile
@iAugur
iAugur / Readme.txt
Last active August 29, 2015 14:02
Magento and Drupal in one site
This Gist is to show how to set up a document structure and VHosts file to get a magento site to work alongside a Drupal site
the original post is here: http://technology.blue-bag.com

This is a good example of how to respond to an issue with Ansible to ensure that your infrastructure is secure and that the measures you take are consistent across your inventory and are documented.

See the full article here for more details.

The example is am using is an issue that cropped up in the Logwatch report for one of our servers. Logwatch is a utility that scans your logs for patterns that may indicate malicious activity. It is commonly used in partnership with fail2Ban and IPtables to ward of common attacks. In this case the line in the log was:

Connection attempts using mod_proxy:
@iAugur
iAugur / ansible-fruits-readme.MD
Last active August 29, 2015 14:17
Ansible Filters and variables
@iAugur
iAugur / block--facetapi.tpl.php
Created October 11, 2012 12:09
Drupal theming
<?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; ?>>
@iAugur
iAugur / gist:3873232
Created October 11, 2012 15:29
APACHE: htaccess html5boilerplate
# 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
@iAugur
iAugur / Drupal Display Suite
Created November 16, 2012 10:55
Drupal: Surface a block as a Display Suite Field
/**
* 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(
@iAugur
iAugur / drupal-quick-dump.sh
Created November 23, 2012 09:06 — forked from timmillwood/drupal-quick-dump.sh
Script to dump Drupal database structure, but exclude data from massive/unneeded tables.
#!/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}:"
@iAugur
iAugur / fpd.sh
Created November 27, 2012 23:44
Bash file to set file permissions for a Drupal site
#!/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
@iAugur
iAugur / How to purge Binary Logs.md
Last active December 12, 2015 01:28
Purge MySQL binary logs
<?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>