Skip to content

Instantly share code, notes, and snippets.

View cafuego's full-sized avatar
😢

Peter Lieverdink cafuego

😢
View GitHub Profile
$('#element').replaceWith('<div id="element">Reloading...</div>');
$.ajax({
type: 'POST',
url: '/js/element-callback',
dataType: 'json',
success: function (data) {
if (data.element) {
// Push the result into the wrapper div.
$('#element').replaceWith('<div id="element">' + data.element + '</div>');
}
<?php
/**
* Implements hook_date_views_extra_tables().
*/
function webform_date_views_extra_tables() {
return array('webform_submissions' => 'webform_submissions');
}
@cafuego
cafuego / quicktabs persist
Created December 23, 2013 00:56
Re-open a quicktab after clicking a link under said tab (for a quicktabs view)
(function ($) {
Drupal.qtpersist = Drupal.qtpersist || {};
Drupal.behaviors.qtpersist = {
attach: function (context, settings) {
$.extend(true, Drupal.settings, settings);
$('.quicktabs-wrapper', context).once(function(){
Drupal.qtpersist.prepare(this);
});
(function($) {
/**
* Keep an unmodified copy of the core search callback function.
*/
Drupal.ACDB.prototype.coreSearch = Drupal.ACDB.prototype.search;
/**
* Override the search callback.
*
@cafuego
cafuego / gist:9677096
Last active August 29, 2015 13:57
uc_gst module
; @file uc_gst.info
name = UC GST
description = Add GST information to the checkout process.
core = 7.x
dependencies[] = uc_cart
<?php
/**
* @file uc_gst.module
* GST module for Ubercart
@cafuego
cafuego / degithub
Last active August 29, 2015 13:57
Rewrite github generated HTML to Backdrop filtered HTML
#!/usr/bin/php
<?php
if ($_SERVER['argc'] == 2) {
$file = $_SERVER['argv'][1];
}
else {
$file = 'php://stdin';
}
$fp = fopen($file, 'r');
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
# Prune stale local branches already removed from origin
git remote prune origin
# Remove local fully merged branches

Keybase proof

I hereby claim:

  • I am cafuego on github.
  • I am cafuego (https://keybase.io/cafuego) on keybase.
  • I have a public key whose fingerprint is 9662 1CB5 8E54 450D 2E12 9D7E 580E 2519 969F 3F57

To claim this, I am signing this object:

diff --git a/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/app/profiles/cod/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
index 9c1d81f..431a567 100644
--- a/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
+++ b/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
@@ -28,6 +28,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
$options['term_page'] = array('default' => TRUE, 'bool' => TRUE);
$options['node'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['user'] = array('default' => FALSE, 'bool' => TRUE);
$options['anyall'] = array('default' => ',');
<?php
/**
* Example of placeholder text on a FAPI form element.
*/
$form['contact']['customerfirstname'] = array(
'#type' => 'textfield',
'#title' => t('First name'),
'#required' => TRUE,
// Other element settings...
'#attributes' => array(