Skip to content

Instantly share code, notes, and snippets.

View ikhoon's full-sized avatar
🐱
Working from home

Ikhun Um ikhoon

🐱
Working from home
View GitHub Profile
@ikhoon
ikhoon / Java8TimeTest.java
Created August 31, 2016 06:25
Java8 Time API 기능 비교
import org.junit.Test;
import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeParseException;
public class Java8TimeTest {
private String instantFormat = "2007-12-03T10:14:30.000Z";
@ikhoon
ikhoon / must-watch-talks.md
Last active April 14, 2020 10:46
Must watch talks - reddit /r/scala
@ikhoon
ikhoon / scaladays2017_cph.md
Created February 12, 2017 12:19
스칼라데이즈 2017 코펜하겐
object TwiiterScalaFutureOps {
import TwitterScalaFutureConverters._
implicit class ScalaToTwitterFuture[T](f: Future[T]) {
def toTwitterFuture: twitter.Future[T] = scalaToTwitterFuture(f)
}
implicit class TwitterToScalaFuture[T](f: twitter.Future[T]) {
def toScalaFuture: Future[T] = twitterToScalaFuture(f)
}
@ikhoon
ikhoon / Contravariant.scala
Last active June 10, 2022 05:59
왜 함수의 input은 반공변성인가?
// https://twitter.github.io/scala_school/type-basics.html
// 트위터 스칼라 스쿨에 나오는 자료구조를 활용해보겠다.
class Animal { val sound = "rustle" }
class Bird extends Animal { override val sound = "call" }
class Chicken extends Bird { override val sound = "cluck" }
class Duck extends Bird { override val sound = "duck" }
def foo(tweet: Bird => String) = {
tweet(new Bird)
@ikhoon
ikhoon / learning-shapeless.md
Last active October 18, 2018 08:51
Learning Materials for generic & dependent programming using shapeless
@ikhoon
ikhoon / reactive-stream-example.scala
Last active May 3, 2018 07:05
Reactive Stream을 활용 예제
import org.reactivestreams.{Processor, Publisher, Subscriber, Subscription}
// 데이터 생성
val publisher = new Publisher[Int] {
def subscribe(s: Subscriber[_ >: Int]) = {
(1 to 100).foreach { x =>
s.onNext(x)
}
s.onComplete()
}
@ikhoon
ikhoon / newmac.sh
Last active September 21, 2022 02:21
#!/bin/bash
# zsh
echo "Installing zsh..."
chsh -s `which zsh`
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
# homebrew, pip
echo "Installing homebrew, pip..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"