Skip to content

Instantly share code, notes, and snippets.

View wreulicke's full-sized avatar
💭
I may be slow to respond.

wreulicke wreulicke

💭
I may be slow to respond.
View GitHub Profile
@wreulicke
wreulicke / 再発明.java
Last active September 26, 2017 16:37
疲れたよパトラッシュ・・・
@Slf4j
public class ExecutionContextExecutorServiceTest {
ExecutorService service = new ExecutionContextExecutorService(Executors.newFixedThreadPool(10));
@Test
public void test() throws Exception {
try (MDCCloseable closeable = MDC.putCloseable("test", "xyz")) {
@wreulicke
wreulicke / TypeSafeBuilder.ts
Created September 19, 2017 06:24
TypeSafeなbuilder
type DiffKey<T extends string, U extends string> = (
& {[P in T]: P }
& {[P in U]: never }
& { [x: string]: never }
)[T];
type Omit<T, K extends keyof T> = Pick<T, DiffKey<keyof T, K>>
type Some = {
x: string,
@wreulicke
wreulicke / memo-release-notes-5.0.0-GA.md
Last active September 12, 2017 20:00
ES Release Notes 5.0.0 ~ 5.6.0

5.0.0 GA Release Notes

The list below cover changes between 5.0.0-rc1 and 5.0.0 GA only.

Also see Breaking changes in 5.0.

Enhancements

Circuit Breakers

{
"env": {
"browser": true,
"es6": true
},
"parser": "typescript-eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
@wreulicke
wreulicke / hoge.njson
Last active August 30, 2017 13:56
謎のjson template ast parser
{
"test": "string",
"vvvv": "{{{vvvv}}}",
"v": 2,
"d": {{{number}}},
"{{{hogehoge}}}":[
{{{template}}},
"{{{edge}}}"
],
"test": bool(h)
configurations {
groovyScript
}
dependencies {
groovyScript localGroovy()
}
task testRun(type:JavaExec){
@wreulicke
wreulicke / main.ml
Last active August 10, 2017 10:58
ocaml良さ
type 'a myList = MyNil | MyCons of 'a * 'a myList
let rec print_mylist l =
match l with
| MyCons(head, tail) ->
print_string(head);
print_mylist(tail);
| MyNil -> print_string("nil")
@wreulicke
wreulicke / .babelrc
Created August 1, 2017 21:35
js-sandbox
{
"presets": [
[
"es2015",
{
"modules": false
}
],
"stage-0"
]
@wreulicke
wreulicke / docker-compose.yml
Created July 29, 2017 20:44
Elasticsearch初期化する何か
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.3.3
ports:
- "9200:9200"
- "9300:9300"
container_name: elasticsearch
hostname: elasticsearch
@Grapes([
@Grab(group= 'org.eclipse.jdt', module= 'org.eclipse.jdt.core', version= '3.12.3')
])
import org.eclipse.jdt.core.dom.*
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import groovy.io.FileType
import org.eclipse.jface.text.BadLocationException
import org.eclipse.jface.text.Document
import org.eclipse.text.edits.MalformedTreeException