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 / contributors.sh
Last active November 21, 2023 07:24
Extract Armeria contributors
#!/usr/bin/env bash
ARMERIA_DIR=??? # Path to Armeria project
RELEASE_NOTES_DIR=site/src/pages/release-notes
VERSIONS=$@
all=""
for version in $VERSIONS; do
current=`grep " '" $ARMERIA_DIR/$RELEASE_NOTES_DIR/$version.mdx | sed "s/[',]//g"`
all="$all$current"
done
/*
* Copyright 2023 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ikhoon
ikhoon / ServiceGroupTest.java
Last active July 6, 2023 15:22
Implementation of a service group that allows multiple services to be grouped together and bound to multiple prefixes.
package com.example.armeria;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
@ikhoon
ikhoon / git-checkout-pr.sh
Last active May 4, 2023 09:30 — forked from trustin/git-checkout-pr.sh
git-checkout-pr.sh - fetches a Git pull request from the remote and creates a local branch for it
#!/usr/bin/env bash
set -Eeuo pipefail
log() {
echo -en '\033[1;32m'
echo -n "$@"
echo -e '\033[0m'
}
choice() {
#!/usr/bin/env bash
set -Eeuo pipefail
BREW='/opt/homebrew/bin/brew'
if [[ ! -x "$BREW" ]]; then
echo 'Install Homebrew first:'
echo
echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
echo
exit 1
@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)"
@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 / test.json5
Created December 8, 2021 05:33
test.json5
{
// comments
unquoted: 'and you can quote me on that',
singleQuotes: 'I can use "double quotes" here',
lineBreaks: "Look, Mom! \
No \\n's!",
hexadecimal: 0xdecaf,
leadingDecimalPoint: .8675309, andTrailing: 8675309.,
positiveSign: +1,
trailingComma: 'in objects', andIn: ['arrays',],

Armeria on Scala