Skip to content

Instantly share code, notes, and snippets.

View chrisns's full-sized avatar

Chris Nesbitt-Smith chrisns

View GitHub Profile
/*
RAC arrays
*/
#define ASIZE 32 /* Maximum array size */
byte index;
byte i = 0;
byte j = 0;
byte isIndex = 1;
@chrisns
chrisns / force_blockcache.patch
Created October 17, 2011 13:42
forces block cache to be enabled with a node_access module present and keys the cache entries by the $_SERVER['HTTP_HOST']
diff U modules/block/block.module block/block.module
--- modules/block/block.module Mon Jan 19 22:26:36 1970
+++ modules/block/block.module Mon Jan 19 22:26:36 1970
@@ -515,4 +515 @@
- // Try fetching the block from cache. Block caching is not compatible with
- // node_access modules. We also preserve the submission of forms in blocks,
- // by fetching from cache only if the request method is 'GET'.
- if (!count(module_implements('node_grants')) && $_SERVER['REQUEST_METHOD'] == 'GET' && ($cid = _block_get_cache_id($block)) && ($cache = cache_get($cid, 'cache_block'))) {
+ if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($cid = _block_get_cache_id($block)) && ($cache = cache_get($cid, 'cache_block'))) {
@@ -576,0 +574 @@
--- modules/block/block.module 2009-03-08 19:34:38.000000000 +0100
+++ modules/block/block.module 2009-03-18 00:06:58.000000000 +0100
@@ -454,6 +454,7 @@
$blocks[$region] = array();
}
+ $time = time();
foreach ($blocks[$region] as $key => $block) {
// Render the block content if it has not been created already.
if (!isset($block->content)) {
acl all src all
acl SSL_ports port 443
acl Safe_ports port 80
acl CONNECT method CONNECT
http_access allow all
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/cns/workspace/bip-dev-1/build
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/cns/workspace/bip-dev-1/build/ >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
--- modules/statistics/statistics.module Tue Sep 27 12:22:41 2011
+++ modules/statistics/statistics.module Mon Sep 26 12:32:40 2011
@@ -46,0 +47,9 @@
+ /*
+ *
+ * Disabled as this is no longer created by drupal.
+ *
+ * Just use analytics and get stats using cron
+ *
+ * bl_tools/update_pageviews_analytics
diff U domain_rules.rules.inc domain_rules.rules.inc
--- domain_rules.rules.inc Mon Jan 19 22:26:36 1970
+++ domain_rules.rules.inc Mon Jan 19 22:26:36 1970
@@ -40,0 +41,11 @@
+ 'rules_action_remove_node_domain' => array(
+ 'label' => t('Remove domain from a node'),
+ 'module' => 'Domain',
+ 'arguments' => array(
+ 'node' => array(
+ 'type' => 'node',
@chrisns
chrisns / gist:1131944
Created August 8, 2011 15:22
workflow patch to disable static cache in initial migration
diff --git workflow.module workflow.module
index de9becd..01b7033 100644
--- workflow.module
+++ workflow.module
@@ -753,7 +753,10 @@ function workflow_node_current_state($node) {
* The ID of the workflow.
*/
function _workflow_creation_state($wid) {
- static $cache;
+ global $initial_migration;
diff --git strongarm.drush.inc strongarm.drush.inc
new file mode 100644
index 0000000..bf90882
--- /dev/null
+++ strongarm.drush.inc
@@ -0,0 +1,6 @@
+<?php
+
+// insure a full bootstrap on update batch processes so strongarm can do initalize and set variables and anything else it needs to do
+function drush_strongarm_pre_updatedb_batch_process() {
diff --git run-tests.sh run-tests.sh
index bcc5095..e0022fd 100755
--- run-tests.sh
+++ run-tests.sh
@@ -387,7 +387,11 @@ function simpletest_script_command($concurrency, $test_id, $tests) {
$command .= ' --color';
}
$command .= " --php " . escapeshellarg($php) . " --concurrency $concurrency --test-id $test_id --execute-batch $tests";
- passthru($command);
+ passthru($command, $output);