Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / drupal-7-xhprof-quick.patch
Created August 8, 2013 22:06
Filthy addition to msonnabaum's quick and dirty method. For your install profiles.
diff --git a/index.php b/index.php
index 8b83199..bef9094 100644
--- a/index.php
+++ b/index.php
@@ -1,4 +1,10 @@
<?php
+xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
+register_shutdown_function(function() {
+ $xhprof_data = xhprof_disable();
+ $filename = '/tmp/' . uniqid() . '.drupal.xhprof';
@peteboere
peteboere / jquery.alterclass.js
Created December 24, 2011 12:49
jQuery alterClass plugin: Remove element classes with wildcard matching. Optionally add classes.
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*
*/
@indytechcook
indytechcook / custom_bean.info
Created December 11, 2011 14:18
Bean Listing Exammple
name = Custom Beans
description = My Custom Beans
core = 7.x
files[] = "custom_bean.listing.inc"