Skip to content

Instantly share code, notes, and snippets.

View shinhyo's full-sized avatar

Luke shinhyo

  • Ground X
  • Seoul
  • 19:23 (UTC +09:00)
View GitHub Profile
@shinhyo
shinhyo / Scoping.kt
Last active February 19, 2020 01:40
with, run, let, also
val s: String? = "1"
val r: Int = with(s) { Integer.parseInt("${s?.length}") }
val r1: Int? = s?.run { Integer.parseInt("$length") }
val r2: Int? = s?.let { s -> Integer.parseInt("${s.length}") }
val r3: String? = s?.also { Integer.parseInt(it) }
@shinhyo
shinhyo / docker-compose.yml
Last active September 27, 2019 03:15
docker-compse plex, transmission
version: "2"
services:
plex:
image: linuxserver/plex:latest
ports:
- 32400:32400
- 32400:32400/udp
- 32469:32469
- 32469:32469/udp