Skip to content

Instantly share code, notes, and snippets.

Avatar

Koji AGAWA atty303

View GitHub Profile
@atty303
atty303 / workspace.sc
Created Apr 19, 2022
mill + JediTerm integration
View workspace.sc
import $cp.`terminal-2.68.jar`
import $ivy.`com.googlecode.lanterna:lanterna:3.1.1`
import com.jediterm.terminal.TerminalColor
import com.jediterm.terminal.model.TerminalModelListener
import scala.util.Using
import com.jediterm.terminal.model.CharBuffer
import com.jediterm.terminal.util.CharUtils
import com.jediterm.terminal.{StyledTextConsumer, TerminalMode, TextStyle}
import com.googlecode.lanterna
View keybase.md

Keybase proof

I hereby claim:

  • I am atty303 on github.
  • I am atty303 (https://keybase.io/atty303) on keybase.
  • I have a public key whose fingerprint is 1D6A D7CA 1500 4605 8A4D BC16 ABB1 431F ED97 453A

To claim this, I am signing this object:

View zio-bench.txt
# JMH version: 1.21
# VM version: JDK 11.0.8, OpenJDK 64-Bit Server VM, 11.0.8+10-LTS
# VM invoker: /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java
# VM options: -Xss128m -Xmx2g
# Warmup: 3 iterations, 10 s each
# Measurement: 3 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Throughput, ops/time
# Benchmark: zio.ArrayFillBenchmark.catsArrayFill
@atty303
atty303 / README.md
Last active Jan 23, 2022
atty303's boxstarter
View README.md
@atty303
atty303 / ConsulQuery.scala
Last active Aug 15, 2018
Consul Resolver for Finagle
View ConsulQuery.scala
package example.finagle.consul
/**
* @see https://github.com/kachayev/finagle-consul/blob/master/src/main/scala/com/twitter/finagle/consul/ConsulQuery.scala
*/
case class ConsulQuery(hosts: String,
name: String,
tags: Set[String],
dc: Option[String],
near: Option[String])
@atty303
atty303 / README.md
Created Nov 10, 2016
Promethes & Grafana - Quick Start
View README.md

手元で素早く Prometheus & Grafana を立ち上げます。 Grafana への DataSource 登録も自動でやるので、すぐに使えます。 Prometheus Exporter の出力の確認にどうぞ。

起動

$ docker-compose up -d
Creating network "ezprometheus_default" with the default driver
Creating ezprometheus_prometheus_1
View SparkApp.scala
package com.adtdp.tenma.shared.spark.app
import scala.util.Try
/**
* Spark アプリケーションを表現する trait
*/
trait SparkApp {
/**
* アプリケーションのエントリポイント
View ClockWrapper.scala
package org.apache.spark.streaming
import org.apache.spark.util.ManualClock
/**
* A `Clock` whose time can be manually set and modified. Its reported time does not change
* as time elapses, but only as its time is modified by callers. This is mainly useful for
* testing.
*
* private[spark] である ManualClock を外から扱えるようにする proxy class.
View out_a.rb
$ sudo /etc/init.d/td-agent start
Starting td-agent: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate fluent-plugin-s3-0.4.1, because fluent-mixin-config-placeholders-0.3.0 conflicts with fluent-mixin-config-placeholders (~> 0.2.0) (Gem::LoadError)
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems.rb:209:in `try_activate'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /etc/td-agent/plugin/out_b.rb:1:in `<top (required)>'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'