Skip to content

Instantly share code, notes, and snippets.

chobie chobie

  • Tokyo/Japan
Block or report user

Report or block chobie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View composer.patch
diff --git a/src/Composer/Config.php b/src/Composer/Config.php
index 087949e..ec6f3e1 100644
--- a/src/Composer/Config.php
+++ b/src/Composer/Config.php
@@ -58,6 +58,9 @@ class Config
// load defaults
$this->config = static::$defaultConfig;
$this->repositories = static::$defaultRepositories;
+ if (getenv("COMPOSER_REPOSITORY_URL")) {
+ $this->repositories['packagist']['url'] = getenv("COMPOSER_REPOSITORY_URL");
@chobie
chobie / phpspec.patch
Created Feb 11, 2014
add ability to specify bootstrap file
View phpspec.patch
diff --git a/src/PhpSpec/Console/Command/RunCommand.php b/src/PhpSpec/Console/Command/RunCommand.php
index ca4a61e..64319d3 100644
--- a/src/PhpSpec/Console/Command/RunCommand.php
+++ b/src/PhpSpec/Console/Command/RunCommand.php
@@ -33,6 +33,7 @@ class RunCommand extends Command
new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Formatter'),
new InputOption('stop-on-failure', null , InputOption::VALUE_NONE, 'Stop on failure'),
new InputOption('no-code-generation', null , InputOption::VALUE_NONE, 'Do not prompt for missing method/class generation'),
+ new InputOption('bootstrap', "b", InputOption::VALUE_OPTIONAL, 'bootstrap file', "SpecHelper.php"),
))
View file_get_contents_or_curl.php
<?php
$request = "http://127.0.0.1/index.html";
//echo file_get_contents($request);exit;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $request);
$ret = curl_exec($ch);
curl_close($ch);
View hhvm-uv-httpserver.txt
chobie@debian:~$ ab -c 500 -n 500 http://0.0.0.0:9999/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 0.0.0.0 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
View influxdb_aggregators.git_log
a3da8b9 remove some debugging statements
1bdea2e Use prefix trees instead of hashmaps to keep the engine state
9008c76 flush the aggregator state as soon as the next bucket start
1cf9f98 simplify the logic of distinct
683a234 fix #413. Don't assume the group by interval is > second
06f4cdd fix #405. Percentile shouldn't crash for small number of values
b127201 fix #394. support count(distinct) and count(DISTINCT)
e2adcf1 Close #318. Support EXPLAIN queries
dbe76df partial fix for issue #294 processing some queries in batches
0d52464 fix #69. Support column aliasing
View run-tests-part.php
function mail_qa_team($data, $compression, $status = false)
{
$url_bits = parse_url(QA_SUBMISSION_PAGE);
if (($proxy = getenv('http_proxy'))) {
$proxy = parse_url($proxy);
$path = $url_bits['host'].$url_bits['path'];
$host = $proxy['host'];
if (empty($proxy['port'])) {
$proxy['port'] = 80;
View Building_and_installing_InfluxDB_on_Debian_Squeeze.md

Building and installing InfluxDB on Debian Squeeze

This page is a work in progress. Instructions are for building the InfluxDB and their package for Debian 6 64bit.)

Packages installation

sudo apt-get install mercurial bzr protobuf-compiler flex bison valgrind g++ make curl rpm build-essential git
View fluent-logger.patch
Index: src/Fluent/Logger/FluentLogger.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Fluent/Logger/FluentLogger.php (date 1365234935000)
+++ src/Fluent/Logger/FluentLogger.php (date 1405348506000)
@@ -72,6 +72,7 @@
"usleep_wait" => self::USLEEP_WAIT,
"persistent" => false,
You can’t perform that action at this time.