This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
df <- read.csv('raw_gluster_replicate_stats.csv') | |
# Cast bricks to string | |
df$bricks <- as.character(df$bricks) | |
ggplot(df, aes(x=bricks, y=read, colour=bricks)) + geom_boxplot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc | |
index 07c9d67..ccd4760 100644 | |
--- a/core/includes/bootstrap.inc | |
+++ b/core/includes/bootstrap.inc | |
@@ -1280,111 +1280,6 @@ function drupal_page_header() { | |
} | |
/** | |
- * Sets HTTP headers in preparation for a cached page response. | |
- * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function modulename_block_info_alter(&$blocks, $theme, $code_blocks) { | |
// Turn on block cache for custom blocks. | |
if (isset($blocks['block'])) { | |
foreach ($blocks['block'] as $bid => &$block) { | |
$block['cache'] = DRUPAL_CACHE_GLOBAL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'csv' | |
class SysBench | |
def initialize(file) | |
if not File.exists? file then | |
puts "File '#{file}' does not exist!" | |
exit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You under the Apache License, Version 2.0 | |
* (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\my_module\Plugins\Blocks | |
use Drupal\Component\Plugin\Annotations\Plugin; | |
use Drupal\Component\Plugin\Annotations\Type; | |
use Drupal\Component\Plugin\Annotations\Title; | |
use Drupal\Component\Plugin\Annotations\Description; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function blah($wtf) { | |
echo "I'm php and I like turtles"; | |
} | |
blah(); | |
//PHP Warning: Missing argument 1 for blah()… |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):008:0> path = '/mnt/gfs' | |
=> "/mnt/gfs" | |
irb(main):009:0> path !~ /[a-z]/i | |
=> false | |
irb(main):010:0> path =~ /[a-z]/i | |
=> 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
bad_uses = {} | |
Dir["**/*.php"].each do |file| | |
class_uses = [] | |
file_contents = open(file).to_a | |
file_contents.grep(/^use/).each do |line| | |
if line.index '\\' | |
line = line.strip.split(/\\/).last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func WritingSettings() | |
setlocal guifont=courier:h18 | |
"setlocal background=light | |
setlocal spell | |
setlocal columns=70 | |
setlocal lines=80 | |
setlocal linespace=10 | |
setlocal nonumber | |
setlocal wrap | |
setlocal linebreak |