Skip to content

Instantly share code, notes, and snippets.

View msonnabaum's full-sized avatar

Mark Sonnabaum msonnabaum

  • Lithic
  • San Diego, CA
View GitHub Profile
<?php
foreach (array_keys(views_get_all_views()) as $view) {
$view = views_get_view($view);
$view->display['default']->display_options['cache'] = array('type' => "none");
foreach ($view->display as $display_name => $display) {
$view->display[$display_name]->display_options['cache'] = array('type' => "none");
}
$view->save();
<?php
/**
* @file
* Definition of Drupal\Core\Cache\ArrayBackend.
*/
namespace Drupal\Core\Cache;
/**
<?php
function menu_render_no_access_checks($menu_name) {
$menu = _menu_build_tree($menu_name, array('max_depth' => 1));
// Copy/paste from menu_navigation_links
foreach ($menu['tree'] as $item) {
if (!$item['link']['hidden']) {
$class = '';
$l = $item['link']['localized_options'];
#!/bin/sh
for FILE in $@
do
TYPE=`file -b $FILE`
if [ "${FILE##*.}" != "csv" -o "$TYPE" != "ASCII text" ]
then
echo "$FILE is not a csv file!"
exit 1
fi
This file has been truncated, but you can view the full file.
C TIME(us) FILE DELTA(us) -- FUNC
1 11678172476 autoload.php 2 -> main
1 11678172531 autoload_real.php 54 -> main
1 11678172560 autoload_real.php 29 <- main
1 11678172600 autoload_real.php 39 -> getLoader
1 11678172655 autoload_real.php 55 -> loadClassLoader
1 11678172717 ClassLoader.php 62 -> main
1 11678172743 ClassLoader.php 25 <- main
1 11678172767 autoload_real.php 24 <- loadClassLoader
1 11678172834 include_paths.php 67 -> main
#!/usr/bin/env php
<?php
function xhprof_raw_format_to_call_records($run_id, $raw_xhprof, $whitelist, $params = array()) {
$calls = array();
foreach ($raw_xhprof as $key => $values) {
if ($key === 'main()') {
$caller = "";
$callee = "main()";
}
diff --git a/puppet/versions/devel/modules/xhprof/files/acquia_xhprof/acquia_xhprof.php b/puppet/versions/devel/modules/xhprof/files/acquia_xhprof/acquia_xhprof.php
index 5cfa756..1bcf4e3 100644
--- a/puppet/versions/devel/modules/xhprof/files/acquia_xhprof/acquia_xhprof.php
+++ b/puppet/versions/devel/modules/xhprof/files/acquia_xhprof/acquia_xhprof.php
@@ -38,8 +38,11 @@ function acquia_hosting_xhprof_enabled() {
// Can't use ini_get here since it's a custom variable.
$xhprof_enabled = get_cfg_var('acquia.xhprof_enabled');
- $ret = FALSE;
if ($xhprof_enabled) {
135 FieldCollectionItemEntity::hostEntity
-> 67 entity_revision_load
-> 67 PanelsPaneController::load
-> 67 EntityCacheControllerHelper::entityCacheLoad
-> 67 PanelsPaneController::attachLoad
-> 67 DrupalDefaultEntityController::attachLoad
-> panelizer_entity_load 362ms
-> PanelizerEntityDefault::has_default_panel
-> 1 PanelizerEntityDefault::default_display_exists 303ms
-> 1 ctools_export_load_object
library("rvest")
library("dplyr")
ec2_df <- html("http://www.ec2instances.info") %>%
html_nodes("table") %>%
first %>%
html_table()
str(ec2_df)
if (!"ggplot2" %in% rownames(installed.packages())) {
install.packages("ggplot2")
}
library("ggplot2")
args <- commandArgs(trailingOnly = TRUE)
before_file <- args[1]
after_file <- args[2]