Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

appkr appkr

🎯
Focusing
View GitHub Profile
@appkr
appkr / howto_install_old_version_of_php.md
Last active Sep 25, 2021
How to intall php@7.1 with homebrew in MacOS
View howto_install_old_version_of_php.md

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 / AddressRefiner.java
Last active Jun 30, 2021
주소정제기 초벌
View AddressRefiner.java
package com.vroong.neogeo.support.address.refiner;
import static com.vroong.neogeo.domain.AdditionalInfo.*;
import static com.vroong.neogeo.domain.RegionType.*;
import static com.vroong.neogeo.support.address.Regex.*;
import com.vroong.neogeo.domain.AddressEntry;
import com.vroong.neogeo.domain.AddressEntry.AddressEntryBuilder;
import com.vroong.neogeo.domain.Refinable;
import com.vroong.neogeo.support.address.Regex;
@appkr
appkr / Charicteristic of Java reference type.md
Last active Apr 28, 2021
Charicteristic of Java reference type
View Charicteristic of Java reference type.md

String type example

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

jshell> String var2 = "appkr";
strVar2 ==> "appkr"
@appkr
appkr / JwtExampleTest.java
Created Feb 16, 2021 — forked from gimbimloki/JwtExampleTest.java
JWT Example (Sign, Verify and etc)
View JwtExampleTest.java
package com.nhn.jwt;
import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.ECDSAKeyProvider;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Maps;
import com.nimbusds.jose.*;
import com.nimbusds.jose.crypto.ECDSASigner;
import com.nimbusds.jose.jwk.Curve;
@appkr
appkr / erd.md
Last active Feb 16, 2021
ERD in plantuml
View erd.md

entity entity
1 -
0 or 1 -o|
one and only 1 -||
many -{
0 or many -o{
1 or many -|{
@appkr
appkr / result.md
Last active Dec 10, 2020
Performance Comparison for Dynamically-typed Non-compile Languages
View result.md

Test Result

Language Execution time(sec)
JS with V8 (Node 8.11) 3.18
PHP 7.2 28.026075124741
PHP 7.0 28.537676095963
Ruby 2.5 37.355172
Python 2.7 70.2023770809
Python 3.6 99.59470009803772
@appkr
appkr / Jconsole.md
Last active Nov 24, 2020
Jconsole - JVM profiler
View Jconsole.md
$ which jconsole
# /Users/appkr/.jenv/shims/jconsole

$ jconsole

@appkr
appkr / yark-shaving.md
Last active Nov 9, 2020
러시아 페인트공, 마세라티, 야크 털깍기
View yark-shaving.md

러시아 페인트공 알고리즘

페인트공이 첫날은 차선 페인트 작업을 300야드 칠함 둘째 날은 150야드 칠함 셋째 날은 30야드 칠함 첫 날은 어떻게 10배를 칠했는지 관리자가 묻자 저도 어쩔 수 없었습니다. 매일 페인트 통에서 점점 멀어지니까요

  • "조엘 온 소프트웨어" by 조엘스폴스키(스택오버플로, 트렐로 창업자)
@appkr
appkr / sql.md
Created Nov 6, 2020
SQL 합집합, 교집합, 차집합, 대칭차집합
View sql.md
CREATE TABLE tablea (str varchar(8), PRIMARY KEY (str));
CREATE TABLE tableb (str varchar(8), PRIMARY KEY (str));
INSERT INTO tablea (str) VALUES ('A'), ('B'), ('C'), ('D');
INSERT INTO tableb (str) VALUES ('C'), ('D'), ('E'), ('F');
-- 합집합
@appkr
appkr / postgis.md
Last active Nov 5, 2020
PostGIS, Postgre
View postgis.md

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;