Skip to content

Instantly share code, notes, and snippets.

*** system.install 2012-07-09 15:58:15.000000000 -0400
--- system-patched.install 2012-01-24 17:21:30.000000000 -0500
*************** function system_requirements($phase) {
*** 474,489 ****
);
}
$requirements['update status']['title'] = $t('Update notifications');
-
- // Check that Drupal can issue HTTP requests.
- if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
Index: system.module
===================================================================
--- modules/system/system.module (revision 8648)
+++ modules/system/system.module (working copy)
@@ -2238,7 +2238,7 @@
}
else {
// File is not found in file system, so delete record from the system table.
- $delete->condition('filename', $file->filename);
+ //$delete->condition('filename', $file->filename);
@CrookedNumber
CrookedNumber / gist:3926920
Created October 21, 2012 13:12
memcached status
echo stats | nc 127.0.0.1 11211
@CrookedNumber
CrookedNumber / gist:3946202
Created October 24, 2012 14:02
List all projects with available updates using Drush
drush vset update_check_disabled 1 -y && drush --simulate --pipe --no up
# see http://mark.shropshires.net/blog/list-all-projects-available-updates-using-drush
@CrookedNumber
CrookedNumber / gist:3946714
Created October 24, 2012 15:20
<HEAD> for create.js
<!-- load the jQuery and require.js libraries -->
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/vendor/jquery-1.7.2.js"></script>
<script type="text/javascript" src="http://cdn.aloha-editor.org/latest/lib/require.js"></script>
<!-- load the Aloha Editor core and some plugins -->
<script src="http://cdn.aloha-editor.org/latest/lib/aloha.js"
data-aloha-plugins="common/ui,
common/format,
common/list,
common/link,
@CrookedNumber
CrookedNumber / gist:4057350
Created November 12, 2012 03:33
Drupal-focused memcache GUI
<?php
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211)
or die ("Could not connect to memcache server");
$cells = '';
$list = array();
$allSlabs = $memcache->getExtendedStats('slabs');
$items = $memcache->getExtendedStats('items');
foreach($allSlabs as $server => $slabs) {
foreach($slabs as $slabId => $slabMeta) {
@CrookedNumber
CrookedNumber / gist:4057335
Created November 12, 2012 03:31
Find actual drupal queries
// From http://www.opensourcery.com/blog/jessehs/what-was-query
// Devel Configuration -- Add this to
$conf['dev_query'] = TRUE;
<?php
global $queries;
$query = array_pop($queries);
dd($query, 'descriptive text about the query being printed out -- this one is logged to /tmp/drupal_debug.txt');
dpm($query, 'descriptive text about the query being printed out -- this one is printed to the screen');
?>
// Also: debug(strtr($query, $query->getArguments())); will show a query with arguments replaced in. It won't be quoted so it's not perfect but it integrates with the testing framework and doesn't require devel. (from CHX)
@CrookedNumber
CrookedNumber / gist:4076643
Created November 15, 2012 04:28
memcahce stats via drush
drush php-eval '$m =memcache_connect("localhost", 11211); print_r($m->getStats());'
@CrookedNumber
CrookedNumber / gist:5213522
Created March 21, 2013 14:38
Bump PHP memory then test
ini_set('memory_limit','2048M');
dpm(ini_get('memory_limit'));
@CrookedNumber
CrookedNumber / clear cache_field bin
Created March 29, 2013 18:58
clear cache_field bin
cache_clear_all('*', 'cache_field', TRUE);