Skip to content

Instantly share code, notes, and snippets.

View davecranwell's full-sized avatar

Dave Cranwell davecranwell

View GitHub Profile
diff --git webform_protected_downloads.module webform_protected_downloads.module
index bf9a728..36c6889 100644
--- webform_protected_downloads.module
+++ webform_protected_downloads.module
@@ -461,7 +461,7 @@ function webform_protected_downloads_file_user_has_access($nid, $fid) {
unset($_SESSION[WEBFORM_PROTECTED_DOWNLOADS_SESSION_KEY][$row->hash]);
$ok = FALSE;
}
- } else {
+ } else {/
@davecranwell
davecranwell / gist:2588438
Created May 3, 2012 19:16
Dave's Sea Bass Kedgeree
Requires:
- 1 Cup basmati rice
- 3 Sea Bass fillets (i.e 3 sides of sea bass)
- 3 eggs
- Cumin seeds
- Cumin powder
- Coriander powder
- Madras curry powder
- Turmeric powder
- 150g Frozen peas
@davecranwell
davecranwell / gist:3135759
Created July 18, 2012 11:51
Indented CSS
/* =============================================================================
Primary styles
========================================================================== */
/* ================ Sprites ================ */
.flag-mini{
float:left;
.image-replaces-text('layered/flags-mini.png', 27px, 27px);
}
@davecranwell
davecranwell / gist:3551678
Created August 31, 2012 11:27
Not indented CSS
/* =============================================================================
Primary styles
========================================================================== */
/* ================ Sprites ================ */
.flag-mini{
float:left;
.image-replaces-text('layered/flags-mini.png', 27px, 27px);
}
@davecranwell
davecranwell / updatecore.sh
Last active December 11, 2015 23:08 — forked from zerolab/updatecore.sh
Updated to suit pressflow
#!/bin/bash
#
# Upgrades/Installs Pressflow (Drupal) core. Targeted at Pressflow 6
# Script based on gopressflow.sh
#
# Should be run from root folder of existing drupal installation
#
# * please backup your files before doing anything!
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Base box to build off, and download URL for when it doesn't exist on the user's system already
config.vm.box = "wagtail-base-v0.1"
config.vm.box_url = "http://downloads.torchbox.com/wagtail-base-v0.1.box"
# You can also build from a vanilla precise32 box, although it'll take longer
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
Normal edit handlers:
--------------------
Am I an immediate child of a content_panel (or promote_panel etc)?
- Yes
- Am I a MultiFieldPanel or InlinePanel?
- Yes
- Output MultiFieldPanel/InlinePanel label as pink bar
- No (I'm a FieldPanel)
- Reuse field's own label as the pink title bar above,
{
"version" : "1.2.3",
"url" : "https://wagtail.io"
}
@davecranwell
davecranwell / AppActions.js
Created May 1, 2015 13:46
React flux issue
/*
* Copyright (c) 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoActions
*/