Skip to content

Instantly share code, notes, and snippets.

PlanOut4J

PlanOut4J is a Java-based implementation of Facebook's PlanOut, an A/B testing framework designed to conduct experiments on the web at scale. PlanOut4J makes it easy to express, deploy and maintain sophisticated randomized experiments and to quickly iterate on these experiments, while satisfying the constraints of large-scale Internet services with many users.

PlanOut4J's emphasis is to enable persons who don't necessarily have comprehensive engineering background create and maintain experiments easily. To that extent, we utilize PlanOut DSL wrapped into an intuitive YAML format. Here is a simple config file describing a trivial namespace (more about namespaces below)

ref:

https://github.com/Glassdoor/planout4j

@relax-more
relax-more / gist:4647663cdeaa7f1064bc
Created September 18, 2015 08:21
「機密情報を含むJSONには X-Content-Type-Options: nosniff をつけるべき」らしい
http://d.hatena.ne.jp/hasegawayosuke/20130517/p1
http://blog.tokumaru.org/2013/05/JSON-information-disclosure-vulnerability-CVE-2013-1297.html
memo
JSONをvbscriptとして読み込ませるJSONハイジャック(CVE-2013-1297)に注意
はせがわようすけ氏のブログエントリ「機密情報を含むJSONには X-Content-Type-Options: nosniff をつけるべき」にて、
巧妙な罠を仕掛けることにより、別ドメインのJSONデータをvbscriptとして読み込み、エラーハンドラ経由で機密情報を
盗み出すという手法が紹介されました。これは、IEの脆弱性CVE-2013-1297を悪用したもので、MS13-037にて
headless browser?
ブラウザです。ただし、画面を描画しません。CUIしかないサーバでも動作します。
何に使えるの?
手でブラウザポチポチクリックして確認する作業全般。 自動テスト、自動画面キャプチャ、自動・・・
http://yukidarake.hateblo.jp/entry/2014/09/12/204813
@relax-more
relax-more / gist:7a47798b9fcdad74ce9c
Created September 2, 2015 08:52
Loggable annotation
http://aspects.jcabi.com/apidocs-0.22/com/jcabi/aspects/Loggable.html
Can just add @Loggable to private methods that we want to log.
I tried it out and got output like this
something
16:02:43.085 [Test worker] INFO c.l.s.c.aspects.impl.TimedAspectTest - #doSomething(): in 1.30ms
something
16:02:43.086 [Test worker] INFO c.l.s.c.aspects.impl.TimedAspectTest - #doSomething(): in 121.78µs
@relax-more
relax-more / gist:1644a747cd3e57eb6adc
Created September 2, 2015 04:01
memo of Bazel, is a build tool from Google
Bazel is a build tool from Google that builds code quickly and reliably. We use it to build the majority of Google's software, and it's specifically designed to handle our huge source code repositories and our testing and release requirements.
memo
http://bazel.io/docs/getting-started.html
@relax-more
relax-more / memo
Created August 10, 2015 12:52
morphia converter
http://stackoverflow.com/questions/22295650/manual-conversion-of-3rd-party-class-with-morphia
@relax-more
relax-more / Snipet.java
Created August 4, 2015 12:17
MoreObjects.firstNonNull
Type type = MoreObjects.firstNonNull(Type.of(A), Type.of(B));
@relax-more
relax-more / pom.xml
Created August 3, 2015 06:45
Define maven.compiler version as properties
<properties>
...
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
...
</properties>
@relax-more
relax-more / Snipet.java
Created July 30, 2015 09:37
Java <-> Javascript
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
public class ScriptingMain
{
public static void main(String[] arguments)
{
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("javascript");
@relax-more
relax-more / gist:a3b6a4cb144a20a45ba1
Created July 24, 2015 07:57
[java] spring RestController
We can use
`@RestController` annotation
instad of `@Controller` and `@ResponceBody`
http://qiita.com/tag1216/items/3680b92cf96eb5a170f0