Skip to content

Instantly share code, notes, and snippets.

@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();
<?php
function hoge() {
}
$begin = microtime(true);
for ($i = 0; $i<1000000;$i++) {
hoge();
}

背景

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

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

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

macbook-2% python3 interoperability/client_test.py
hostname localhost port 1883
clean up starting
clean up finished
Basic test starting
Basic test succeeded
Retained message test starting
Retained message test succeeded
Traceback (most recent call last):
File "interoperability/client_test.py", line 231, in offline_message_queueing_test
require 'mqtt'
username = "example@github"
password = "password"
client = MQTT::Client.connect(:host => 'free.mqtt.shiguredo.jp', :port => 1883, :username => username, :password => password)
client.subscribe("#{username}/debug")
client.publish("#{username}/debug", "helo", 0)
client.get do |topic,message|
print topic
package main
import (
"sync"
"testing"
)
func BenchmarkLock(t *testing.B) {
mu := sync.Mutex{}
m := make(map[int]bool)
1/4/04 0
1/11/04 0
1/18/04 0
1/25/04 0
2/1/04 0
2/8/04 0
2/15/04 0
2/22/04 6
2/29/04 0
3/7/04 0
% mkdir surgemq
% cd surgemq
% export GOPATH=`pwd`
% go get github.com/surge/surgemq
% go get github.com/dataence/assert
% cd src/github.com/surge/surgemq/benchmark
% GOMAXPROCS=2 go test -run=TestServer -vv=2 -logtostderr
I1207 16:43:21.135916 63352 server.go:44/ListenAndServe] server/ListenAndServe: server is ready...
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &122172
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 409072}
<?php
/*
mysqliでコネクションを確認しつつ接続しなおすサンプル
*/
$mysqli = mysqli_init();
$mysqli->options(MYSQLI_INIT_COMMAND,"set names utf8");
$host = "localhost";
$user = "user";
$pass = "";
$db_name = "moe";