Skip to content

Instantly share code, notes, and snippets.

View hnagato's full-sized avatar

nagato hnagato

  • Japan
View GitHub Profile
@asufana
asufana / Java8 Stream, Optional, Either and Try.md
Last active November 24, 2021 05:54
Java8 Streamから学ぶOptionalモナドとEitherモナド。

Java8 Stream, Optional, Either and Try.

Java8 Stream の使い方を覚えたら、Optional や Either もすぐ使えるようになるよ!編

Stream

リスト要素の有無を意識せずに処理することができる

ES6

文法の基礎

変数展開

左辺にもブレスを書いて配列展開できる

[es6]
var arr = [1,2,3];
@taea
taea / how-to-esa.md
Last active March 4, 2022 00:42
esaのつかいかた(\( ⁰⊖⁰)/)

esa.io のつかいかた

Save as WIP Ship it! ボタンについて

esa-man.jpg

Save as WIP ボタン

  • 投稿画面、編集画面に Save as WIP というボタンがあります。これを押すと、「書き途中だけど保存して公開する」という意味になります。
  • WIP = Work in Progress (作業中)
  • Save as WIP で保存された記事は、一覧画面などの投稿タイトルに WIP と付いてグレーアウトした状態になります。
@dolpen
dolpen / Main.java
Last active December 31, 2015 16:59
絶対に許されない
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* 許せ
*
* 1版:適当探索
* 2版:IO改善
* 3版:最悪でない入力に対する探索打ち切り改善
@lvl-svasseur
lvl-svasseur / .gitconfig
Last active January 1, 2020 17:29 — forked from coderxin/git-merge-tool
git mergetool config (by command line or .gitconfig)
[merge]
tool = intellij
# tool = Kaleidoscope
[diff]
tool = intellij
# tool = Kaleidoscope
# intellij mergetool config
[mergetool "intellij"]
cmd = /Applications/IntelliJ\\ IDEA\ 13\\ CE.app/Contents/MacOS/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
@ms-tg
ms-tg / jdk8_optional_monad_laws.java
Created November 11, 2013 21:14
Does JDK8's Optional class satisfy the Monad laws? Yes, it does.
/**
* ```
* Does JDK8's Optional class satisfy the Monad laws?
* =================================================
* 1. Left identity: true
* 2. Right identity: true
* 3. Associativity: true
*
* Yes, it does.
* ```
@mikeda
mikeda / nginx.conf
Last active May 12, 2019 23:21
Nginxでクエリストリングを見て振り分け先を切り替える。 http://localhost/test.txt?para1=AAA ならバランサ1、 http://localhost/test.txt?para1=CCC ならバランサ2
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)