Skip to content

Instantly share code, notes, and snippets.

View appkr's full-sized avatar
🎯
Focusing

appkr appkr

🎯
Focusing
View GitHub Profile
@appkr
appkr / Charicteristic of Java reference type.md
Last active April 28, 2021 01:05
Charicteristic of Java reference type

String type example

  • 참조 타입에서 ==, != 연산은 같은 객체인지를 비교한다. 즉 메모리 번지가 같은지를 비교한다.
  • 값을 비교하기 위해서는 Object.equals API를 이용한다
jshell> String var1 = "appkr";
strVar1 ==> "appkr"

jshell> String var2 = "appkr";
strVar2 ==> "appkr"
@appkr
appkr / howto_install_old_version_of_php.md
Last active September 25, 2021 06:50
How to intall php@7.1 with homebrew in MacOS

Workaround

Register the custom repostory as homebrew tap

~ $ TAP=appkr/homebrew-repo
~ $ brew tap $TAP

Install the binary from the custom repository AS USUAL

@appkr
appkr / the_5things_we_cannot_change.md
Created September 12, 2019 04:37
절대로 바꿀 수 없는 다섯 가지

계획을 세우는 것은 성숙한 활동이고, 건강한 자의의 특징입니다. 그러나 완벽하게 통제하고 지배하고 싶어하는 욕구는 오히려 인생의 기쁨을 놓치는 첩경이 됩니다. 인생은 늘 계획대로 되지는 않습니다.

불황실성은 삶의 본질입니다.


계획대로 되기를 바라는 욕구만 갖고 있고, 계획과는 다르게 일어나는 일들을 인정하고 적응하는 능력이 부족하다면 우리는 <인생 조건>에 언제나 난타당하기만 할 것입니다.

  • 절대로 바꿀 수 없는 다섯 가지
@appkr
appkr / ImmutabilityTest.java
Last active September 14, 2020 06:05
Is Java HashMap and ArrayList immutable? NOPE. The same is true for other languages.
package kata;
import org.junit.Test;
import java.util.*;
import static org.junit.Assert.*;
public class MutabilityTest {
@Test
public void isJavaMapImmutable() {
@appkr
appkr / php_cpu.md
Last active July 24, 2019 12:33
PHP의 CPU 사용에 관한 실험
@appkr
appkr / postgis.md
Last active November 5, 2020 03:30
PostGIS, Postgre

101

Create table

CREATE DATABASE db_name ENCODING=utf8 lc_collate="C" template=template0;

-- Reconnect to `db_name` database
-- @see https://stackoverflow.com/questions/3949876/how-to-switch-databases-in-psql
CREATE EXTENSION postgis;
@appkr
appkr / kotlin.md
Created July 21, 2019 13:53
Kotlin