Skip to content

Instantly share code, notes, and snippets.

View eed3si9n's full-sized avatar

eugene yokota eed3si9n

View GitHub Profile
$ pwd
/tmp/dockertest
$ 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
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

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!

Prerequisites

@gkossakowski
gkossakowski / asSeenFrom.md
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

Introduction

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
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
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: worker-linux-4-2.bb.travis-ci.org:travis-linux-5
git.1
0.21s$ git clone --depth=50 --branch=withConsolidatedResolution git://github.com/xuwei-k/scalikejdbc.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.
https://github.com/sbt/sbt 1753
https://github.com/mpeltonen/sbt-idea 724
https://github.com/typesafehub/sbteclipse 361
https://github.com/sbt/sbt-assembly 266
https://github.com/sbt/sbt-native-packager 159
https://github.com/sbt/sbt-onejar 135
https://github.com/orfjackal/idea-sbt-plugin 126
https://github.com/sbt/sbt-release 123
https://github.com/sbt/sbt-start-script 111
https://github.com/xerial/sbt-pack 73

collection

each(list, iterator, [context]forEachforeach
underscoreScala
@paulp
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
halcat0x15a / TwitterMachine.scala
Last active December 15, 2015 00:28
Twitter User Streams with scala-machines!
import scala.language.postfixOps
import java.io._
import scalaj.http._
import scalaz._, Scalaz._
import scalaz.effect._, Effect._, IO._
import scalaz.concurrent.Promise
@orrsella
orrsella / sbt-global-plugin.md
Last active December 12, 2015 00:18
Instructions on how to reproduce sbt global plugin reload bug.