Skip to content

Instantly share code, notes, and snippets.

@xerial
xerial / karabiner-cursor-mode.json
Last active June 9, 2023 03:37
Karabiner Cursor Mode Setting. Put this file in ~/.config/karabiner/assets/complex_modifications/
{
"title": "Cursor-mode layout for saving your little fingers",
"rules": [
{
"description": "Cursor-mode: Enter the cursor mode with left command click. i/j/k/l to arrows. Exit when ctrl/esc/enter/backspace or command+(any) is pressed.",
"manipulators": [
{
"conditions": [
{
"name": "cursor_layout",

明日の下書き


これはなに

  • 高円寺.dev #3 用の資料 https://koenji.connpass.com/event/160886/
  • フロントエンド専門じゃない人向けの、フロントエンドの最先端〜やや未来の話です
  • このレイヤーでは Node.js を使うべき/使うと強いという部分がありますが、他言語を否定しているわけではありません。むしろ他言語でこのアーキテクチャを模倣してほしいという話です。
@grimrose
grimrose / ScalaFutureSupport.scala
Last active September 20, 2019 19:14
AirSpec(19.9.7) for Scala Future
package ninja.grimrose.sandbox
import wvlet.airframe.SourceCode
import wvlet.airspec.AirSpec
import wvlet.airspec.spi.AssertionFailure
import scala.concurrent.{ExecutionContext, Future}
import scala.util.{Failure, Success}
trait ScalaFutureSupport { this: AirSpec =>
@grimrose
grimrose / Server.scala
Last active March 9, 2019 00:48
airframe-http-finagle(19.2.0) + zipkin-finagle-http(2.0.11) or finagle-opencensus-tracing(19.2.0) sample
import com.twitter.finagle.Http
import com.twitter.finagle.http.{ Request, Response }
import com.twitter.finagle.tracing.Tracer
import wvlet.airframe._
import wvlet.airframe.http.{ Endpoint, HttpMethod }
import wvlet.airframe.http.finagle.FinagleServer.FinagleService
import wvlet.airframe.http.finagle._
import wvlet.airframe.http.{ ControllerProvider, ResponseHandler, Router }
import wvlet.log.LogFormatter.SourceCodeLogFormatter
class ApiServer extends HttpApp {
protected val design: Design = bind[Design] // ApiServerの外部で定義されているDesginを参照したい
.bind[AtomicReference[ActorSystem]]
.toInstance(systemReference)
.bind[ActorSystem]
.toInstanceProvider[AtomicReference[ActorSystem]](_.get)
// snip
@mururu
mururu / 無題.md
Last active August 3, 2018 03:16
無題

ちょっと前の話ですが、トレジャーデータという会社を辞めました。えぐいほどいい会社だし、全世界のIoTデータをさばくやつを作るのは技術者として死ぬほど楽しいんだろうなと思ったけど、僕はあるスタートアップに行くことにしました。

カンムという会社です。よろしくお願いします。

@gvolpe
gvolpe / di-in-fp.md
Last active April 24, 2024 20:51
Dependency Injection in Functional Programming

Dependency Injection in Functional Programming

There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.

A few of the most claimed benefits are the following:

  • Dependency Injection.
  • Life cycle management.
  • Dependency graph rewriting.
@gakuzzzz
gakuzzzz / design_pattern_in_scala.md
Last active February 12, 2024 02:05
Design Patterns in Scala (ScalaMatsuri 2018 Unconfoerence)

Design Patterns in Scala

Scala でよく見るパターン

Type-Safe Builder

Javaで多引数のコンストラクタを避けるために使われる Builder パターンは、Scala では名前付き引数呼び出しが使えるので必要ありません。

Builderパターンに制約を加えて条件に合わない場合、コンパイルエラーにしたい。

@takezoe
takezoe / scala_kansai_summit_2017_slides.md
Last active November 11, 2018 06:35
Scala関西Summit 2017のスライド #scala_ks

How to GPG as a Scala OSS Maintainer

tl;dr Generate a GPG key pair (exercising appropriate paranoia). Send it to key servers. Create a Keybase account with the public part of that key. Use your keypair to sign git tags and SBT artifacts.

GPG is probably one of the least understood day-to-day pieces of software in the modern developer's toolshed. It's certainly the least understood of the important pieces of software (literally no one cares that you can't remember grep's regex variant), and this is a testament to the mightily terrible user interface it exposes to its otherwise extremely simple functionality. It's almost like cryptographers think that part of the security comes from the fact that bad guys can't figure it out any more than the good guys can.

Anyway, GPG is important for open source in particular because of one specific feature of public/private key cryptography: signing. Any published software should be signed by the developer (or company) who published it. Ideally, consu