Skip to content

Instantly share code, notes, and snippets.

View bonoogi's full-sized avatar

구본욱 Finn bonoogi

View GitHub Profile
class Singleton private constructor() {
companion object {
// Volatile: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-volatile/index.html
@Volatile private var instance: Singleton? = null
// JvmStatic: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-static/index.html
@JvmStatic fun getInstance(): Singleton =
instance ?: synchronized(this) {
instance ?: Singleton().also {
instance = it

자꾸 까먹어서 만드는 VSCODE 사용법 모음

  • 명령 팔레트: cmd+shift+p / ctrl+shift+p
  • 현재 파일을 새 창으로 띄우기: cmd + k 후 손가락 떼고 o
  • 자동 라인브레이크 토글: option + z