Skip to content

Instantly share code, notes, and snippets.

View eed3si9n's full-sized avatar

eugene yokota eed3si9n

View GitHub Profile
$ pwd
$ docker run -it -v $HOME/.ivy2/local:/root/.ivy2/local --name sbttest openjdk:9-slim bash
apt-get update
apt-get install -y rsync
apt-get install -y bc
apt-get install -y vim
apt-get install -y gpg
kevin-smets /
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry


Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!


gkossakowski /
Last active June 19, 2018 18:27
Understand Scala's core typechecking rules

Scala's "type T in class C as seen from a prefix type S" with examples


Recently, I found myself in need to precisely understand Scala's core typechecking rules. I was particulary interested in understanding rules responsible for typechecking signatures of members defined in classes (and all types derived from them). Scala Language Specification (SLS) contains definition of the rules but lacks any examples. The definition of the rules uses mutual recursion and nested switch-like constructs that make it hard to follow. I've written down examples together with explanation how specific set of rules (grouped thematically) is applied. These notes helped me gain confidence that I fully understand Scala's core typechecking algorithm.

As Seen From

Let's quote the Scala spec for As Seen From (ASF) rules numbered for an easier reference:

domenic /
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
Using worker:
0.21s$ git clone --depth=50 --branch=withConsolidatedResolution git:// xuwei-k/scalikejdbc
Cloning into 'xuwei-k/scalikejdbc'...
remote: Counting objects: 1073, done.
remote: Compressing objects: 100% (695/695), done.
remote: Total 1073 (delta 330), reused 822 (delta 192)
Receiving objects: 100% (1073/1073), 331.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (330/330), done.
Checking connectivity... done. 1753 724 361 266 159 135 126 123 111 73


each(list, iterator, [context]forEachforeach
paulp / transcript
Last active December 15, 2015 13:09
scala> class Bippy(xs: List[Int]) extends improving.TypesafeProxy(xs) { def isEmpty = true }
defined class Bippy
scala> val bippy = new Bippy(1 to 10 toList)
bippy: Bippy = List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
scala> bippy.slice(3, 7)
[proxy] $line4.$read.$iw.$iw.bippy.slice(3, 7)
res1: List[Int] = List(4, 5, 6, 7)
halcat0x15a / TwitterMachine.scala
Last active December 15, 2015 00:28
Twitter User Streams with scala-machines!
import scala.language.postfixOps
import scalaj.http._
import scalaz._, Scalaz._
import scalaz.effect._, Effect._, IO._
import scalaz.concurrent.Promise
orrsella /
Last active December 12, 2015 00:18
Instructions on how to reproduce sbt global plugin reload bug.