Skip to content

Instantly share code, notes, and snippets.

View xurizaemon's full-sized avatar
🌻
SPRING

Chris Burgess xurizaemon

🌻
SPRING
View GitHub Profile
@xurizaemon
xurizaemon / unique-listen
Created March 9, 2014 10:04
listen, you're unique
commit f83fcbc2d149e3c80a7d99f9bbf81d566ca159ff
Author: Chris Burgess <chris@giantrobot.co.nz>
Date: Sun Mar 9 23:03:51 2014 +1300
Do not write duplicate Listen statements. (nginx only)
diff --git a/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php b/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php
index 6e9358d..9817a36 100644
--- a/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php
+++ b/http/Provision/Config/Nginx/Ssl/server_ssl.tpl.php
#!/bin/bash
if [ -z "$1" ] ; then
echo "Usage: discover-drupal-sites.sh PATH."
exit 1
fi
if [ ! -d "$1" ] ; then
echo "$1 is not a directory."
exit 1
@xurizaemon
xurizaemon / keybase.md
Created March 18, 2014 00:37
keybase claims, proving at least my capability of registering for three websites using the same silly name

Keybase proof

I hereby claim:

  • I am xurizaemon on github.
  • I am xurizaemon (https://keybase.io/xurizaemon) on keybase.
  • I have a public key whose fingerprint is DD4D 0C01 42D3 2778 62D4 A291 BA1A BFA3 011A EE11

To claim this, I am signing this object:

--- ../../../../modules/civicrm/templates/./CRM/Event/Form/Registration/Register.tpl 2011-04-05 13:45:52.000000000 +1200
+++ ./CRM/Event/Form/Registration/Register.tpl 2011-04-05 13:45:05.000000000 +1200
@@ -23,6 +23,18 @@
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
+
+{php}
+ $event_title = $this->_tpl_vars['event']['title'];
+ $event_id = $this->_tpl_vars['event']['id'];
name = Filter Cleanup
description =
package =
core = 7.x
@xurizaemon
xurizaemon / gist:11354903
Created April 27, 2014 20:25
drupal honeypot fail2ban
Author: Chris Burgess <chris@fuzion.co.nz>
Date: Sun Apr 27 20:52:39 2014 +0100
Fail2ban rules for Drupal + honeypot.
diff --git a/.etckeeper b/.etckeeper
index 813fd3c..e705732 100755
--- a/.etckeeper
+++ b/.etckeeper
@@ -471,6 +471,8 @@ maybe chmod 0644 './fail2ban/filter.d/couriersmtp.conf'
diff --git a/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc b/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc
index 3e86f97..a4b1c6c 100644
--- a/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc
+++ b/print_pdf/lib_handlers/print_pdf_wkhtmltopdf/print_pdf_wkhtmltopdf.pages.inc
@@ -33,7 +33,7 @@ function print_pdf_wkhtmltopdf_print_pdf_generate($html, $meta, $paper_size = NU
$version = print_pdf_wkhtmltopdf_pdf_tool_version($pdf_tool[1]);
// 0.10.0 beta2 identifies itself as 0.9.9
- if (version_compare($version, '0.9.9', '>=')) {
+ if (version_compare($version, '0.10', '>=')) {
commit 86c913f1f0bb9ccf2a36938778675e29976459da
Author: Torrance <torrance@fuzion.co.nz>
Date: Wed Feb 20 13:08:50 2013 +1300
Ensure drupal_write_record sets NULL values for contact_b when it is empty.
diff --git a/civicrm_relationship_og.module b/civicrm_relationship_og.module
index f495317..4921119 100644
--- a/civicrm_relationship_og.module
+++ b/civicrm_relationship_og.module
commit 86c913f1f0bb9ccf2a36938778675e29976459da
Author: Torrance <torrance@fuzion.co.nz>
Date: Wed Feb 20 13:08:50 2013 +1300
Ensure drupal_write_record sets NULL values for contact_b when it is empty.
diff --git a/civicrm_relationship_og.module b/civicrm_relationship_og.module
index f495317..4921119 100644
--- a/civicrm_relationship_og.module
+++ b/civicrm_relationship_og.module
diff --git a/xml/schema/Contact/Contact.xml b/xml/schema/Contact/Contact.xml
index 06156df..00dc089 100644
--- a/xml/schema/Contact/Contact.xml
+++ b/xml/schema/Contact/Contact.xml
@@ -644,6 +644,8 @@
<type>timestamp</type>
<comment>When was the contact was created.</comment>
<required>false</required>
+ <export>true</export>
+ <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>