Skip to content

Instantly share code, notes, and snippets.

背景

今年はいつもと違ったことにチャレンジしていこう、という一環でYAPC Asiaに参加して、さらに幸せなことにLTで喋らさせていただきました。 企業・個人を含めOSS開発への参加って気軽だけど継続していくのは難しいと思っていた内容を皆様にお伝えして、なにかいいアイデアあったら 改善にチャレンジしたいなぁ、今後OSS参加する人への障壁を下げたりしたいなという魂胆がありました。

LT資料:https://speakerdeck.com/chobie/ossfalserisoutogenzitu

Perl界隈の方は技術や運用に真面目な方が多く情熱持った人が多いなーというのが特に印象的でした。 日本のPHP界隈はどうしてもビギナー向けの方の説明が多かったりするのでガチな人はあんまり表に出てこないんですよねぇ。

<?php
function hoge() {
}
$begin = microtime(true);
for ($i = 0; $i<1000000;$i++) {
hoge();
}
@chobie
chobie / dict.go
Created August 1, 2014 14:30
osx dictionary
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework CoreServices -framework Foundation
#import <CoreServices/CoreServices.h>
#import <Foundation/Foundation.h>
NSArray *DCSGetActiveDictionaries();
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,

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
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;
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
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
<?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);