Skip to content

Instantly share code, notes, and snippets.

😀

Ikhun Um ikhoon

😀
Block or report user

Report or block ikhoon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View json-unit-dep.tree
org.hamcrest:hamcrest:2.1
variant "default" [
org.gradle.status = release (not requested)
]
org.hamcrest:hamcrest:2.1
\--- org.awaitility:awaitility:4.0.1
\--- allDependencies (requested org.awaitility:awaitility)
org.hamcrest:hamcrest-core:1.3
@ikhoon
ikhoon / lambdainstance.java
Created Sep 30, 2019
Check java lambda instance is singleton.
View lambdainstance.java
String foo() {
return "abc";
}
String foo(Supplier<String> s) {
System.out.println(s);
return "abc " + s.get();
}
@Test
@ikhoon
ikhoon / lambdainstance.java
Created Sep 30, 2019
Check java lambda instance is singleton.
View lambdainstance.java
String foo() {
return "abc";
}
String foo(Supplier<String> s) {
System.out.println(s);
return "abc " + s.get();
}
@Test
View pubsub.java
Subscriber<Integer> subscriber = ...;
Publisher<Integer> publisher = new Publisher<Integer>() {
@Override
public void subscribe(Subscriber<? super Integer> subscriber) {
Subscription subscription = ...;
// give subscription to subscriber
subscriber.onSubscribe(subscription);
}
};
// subscribe stream events
@ikhoon
ikhoon / checkout-pr.zsh
Last active Oct 7, 2019
git checkout remote pull request to local branch and track it with FZF-TMUX
View checkout-pr.zsh
# git checkout remote pull request to local branch and track it with FZF-TMUX
# Requirements:
# - hub : https://github.com/github/hub
# - fzf-tmux : https://github.com/junegunn/fzf#fzf-tmux-script
pr() {
local pr_list pr_id origin branch_name
pr_list=$(cat /dev/null | hub pr list -f "%pC%>(8)%i%Creset %t @%au %l%n")
result=$?
if [[ $pr_list == *"github.com username:"* ]]; then
echo "Please run 'hub pr list' to login GitHub"
View newmac.sh
#!/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..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ikhoon
ikhoon / reactive-stream-example.scala
Last active May 3, 2018
Reactive Stream을 활용 예제
View reactive-stream-example.scala
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()
}
View scala-fp-books.md
@ikhoon
ikhoon / learning-shapeless.md
Last active Oct 18, 2018
Learning Materials for generic & dependent programming using shapeless
View learning-shapeless.md
You can’t perform that action at this time.