This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Templates for guava ## | |
| .toList : convert to ImmutableList | |
| java.util.stream.Stream -> $expr$.collect(com.google.common.collect.ImmutableList.toImmutableList()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "armeria-common-worker-nio-2-1@4812" daemon prio=5 tid=0x17 nid=NA runnable | |
| java.lang.Thread.State: RUNNABLE | |
| at com.linecorp.armeria.internal.Http2ObjectEncoder.doWriteData(Http2ObjectEncoder.java:93) | |
| at com.linecorp.armeria.internal.HttpObjectEncoder.writeData(HttpObjectEncoder.java:85) | |
| at com.linecorp.armeria.server.HttpResponseSubscriber.write(HttpResponseSubscriber.java:298) | |
| at com.linecorp.armeria.server.HttpResponseSubscriber.onNext(HttpResponseSubscriber.java:227) | |
| at com.linecorp.armeria.server.HttpResponseSubscriber.onNext(HttpResponseSubscriber.java:58) | |
| at com.linecorp.armeria.common.stream.DefaultStreamMessage.notifySubscriberWithElements(DefaultStreamMessage.java:341) | |
| at com.linecorp.armeria.common.stream.DefaultStreamMessage.notifySubscriber0(DefaultStreamMessage.java:319) | |
| at com.linecorp.armeria.common.stream.DefaultStreamMessage.doRequest(DefaultStreamMessage.java:188) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package category | |
| import java.util.concurrent.CompletableFuture | |
| object Functors { | |
| // Monad ํต์ฌ: ๋ง์ด ์ฐ์ธ๋ค. | |
| // A => B, F[A] => (A => B), => F[B] | |
| // Map Pair(A, B) | |
| // type class, ํน์ ํ์ ์ ๊ธฐ๋ฐ๋ ํ์ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String foo() { | |
| return "abc"; | |
| } | |
| String foo(Supplier<String> s) { | |
| System.out.println(s); | |
| return "abc " + s.get(); | |
| } | |
| @Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | |
| } |
Scala Cookbook ์ ์๊ฐ ์, ๊ฐ๋ฐ ๋ฟ๋ง ์๋๋ผ FP์ ์ญ์ฌ์ ๊ฐ์ ๋ด์ฉ๋ ํฌํจ๋์ด ์์
ENSIME ๋ฉ์ธ ๋ฉ์ธํ ์ด๋๊ฐ ์ - scalaz๋ฅผ ํ์ฉํ์ฌ FP๋ก ํ๋ก๊ทธ๋๋ฐ์ ํ ์ ์๋๋ฐฉ๋ฒ์ ๋ํด์ ์๋ ค์ค
์ผ๋ช ๋นจ๊ฐ ์ฑ ์ด๋ผ ๋ถ๋ฆฌ๋ฉฐ, scala + FP์ ๋ฐ์ด๋ธ ๊ฐ์ ์กด์ฌ, ํ์ง๋ง ์ด๋ ค์