Skip to content

Instantly share code, notes, and snippets.

View appkr's full-sized avatar
🎯
Focusing

appkr appkr

🎯
Focusing
View GitHub Profile
@appkr
appkr / AddressRefiner.java
Last active March 23, 2024 02:47
주소정제기 초벌
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 / basic_command.md
Last active January 15, 2024 08:22
OpenAPI Generator (a.k.a. Swagger Codegen)
openapi-generator version
openapi-generator help
openapi-generator list
openapi-generator help generate
openapi-generator generate -g spring -i api.yml -o build/spring_server

openapi-generator generate -g php -i api.yml -o build/php_client
@appkr
appkr / guzzle_req_res_middleware.php
Last active July 19, 2023 14:15
Guzzle RequestResponseLog Middleware Example
<?php
namespace App\Providers;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Middleware;
use GuzzleHttp\Promise\PromiseInterface;
use Illuminate\Contracts\Foundation\Application;
@appkr
appkr / erd.md
Last active March 23, 2023 21:52
ERD in plantuml

entity entity
1 -
0 or 1 -o|
one and only 1 -||
many -{
0 or many -o{
1 or many -|{
@appkr
appkr / how_to_use_hamcrest_matcher_with_phpunit.md
Created May 5, 2019 18:26
How to use Hamcrest Matcher with PHPUnit

1 Set up

<?php // tests/HamcrestTestCase.php

namespace Tests;

use Hamcrest\MatcherAssert;
use Hamcrest\Util;
@appkr
appkr / result.md
Last active April 16, 2022 06:01
Performance Comparison for Dynamically-typed Non-compile Languages

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 / 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 / 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 ==&gt; "appkr"
@appkr
appkr / JwtExampleTest.java
Created February 16, 2021 12:26 — forked from gimbimloki/JwtExampleTest.java
JWT Example (Sign, Verify and etc)
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 / Jconsole.md
Last active November 24, 2020 02:14
Jconsole - JVM profiler
$ which jconsole
# /Users/appkr/.jenv/shims/jconsole

$ jconsole