Skip to content

Instantly share code, notes, and snippets.

View stella6767's full-sized avatar
🎯
Focusing

Kang Min Kyu stella6767

🎯
Focusing
View GitHub Profile
@ihoneymon
ihoneymon / 20220627-spring-boot-application-configuration-data-desc.adoc
Last active March 29, 2023 08:27
스프링 부트 구성파일 데이터 적재 간단설명

스프링 부트 구성속성 이용(Spring Boot External Configuration)

스프링 부트에서는 애플리케이션에서 필요한 속성을 "애플리케이션 구성파일" application.yml(혹은 applicatoin.properties) 에 작성하여 활용합니다.

Note

데이터구조를 계층형으로 표현할 수 있어서 개인적으로 .properties 파일 보다는 .yml(YAML) 파일 이용을 선호합니다.

@rg3915
rg3915 / README.md
Created December 22, 2021 00:11
Alpine.js example
@gunlee01
gunlee01 / FiberTest.java
Created September 20, 2020 13:28
Project Loom, fiber(virtual thread) test generating stack trace.
package gunlee.demo.fiber;
import org.junit.jupiter.api.Test;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
@novecentonove
novecentonove / alpineAxios.html
Created July 30, 2020 21:23
Alpine js / Axios Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<title>Alpine and axios</title>
</head>

Two approaches to handle error responses from Spring WebClient calls globally:

  • Exceptions with webclients are all wrapped in WebClientResponseException class. So we can handle that using Spring's ExceptionHandler annotation.

  • Using ExchangeFilterFunction while constructing the webclient bean.

@GamerGirlandCo
GamerGirlandCo / code.md
Created June 15, 2020 18:53 — forked from ChenYCL/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

Singleton

  1. Roll-your-own lazy singleton

    public final class Single {
        private static Single INSTANCE;
        private Single() {}
        
@shoark7
shoark7 / algorithm-sites.md
Last active April 27, 2024 16:31
개인적으로 사용했던 알고리즘 사이트들을 추천드립니다.

알고리즘이라고 많이 들어보셨을 겁니다. 알고리즘은 교과서식으로 정의해보면 '문제를 해결하는 일련의 절차'라고 할 수 있는데요. 컴퓨터로 어떤 문제를 해결해야 할 때, 코딩으로 어떻게 해결할지에 대한 구체적인 방법을 이야기합니다.

예를 들어, 숫자 배열을 정렬하는 문제가 있다고 합시다. 인간이 배열을 대충 보고 정렬하기는 쉽지만 원소의 개수가 수백만개에 달하는 배열에서 컴퓨터에게 일을 시켜서 컴퓨터가 정렬하게 하는 것은 쉽지 않습니다. 실제로 정렬은 알고리즘에서 매우 유명하고 기초적인 분야로 정렬을 하는 방법, 즉 알고리즘이 지금까지 알려진 것만 해도 수십가지가 됩니다.

알고리즘을 공부하는 것은 꽤 도움이 되는데요. 일단 코딩을 시작하시는 분들 입장에서는 코딩을 하게 되서 코딩과 문법에 익숙해지는 장점이 있고, 또 개발자적 사고를 하는 데 알고리즘 문제를 푸는 것이 도움이 됩니다. 어떤 개발 회사들은 알고리즘 능력을 테스트하기 때문에 취업을 목표로 공부하신다면 손해는 보지 않습니다.

저는 알고리즘을 좋아해서 조금씩 풀어왔는데요. 알고리즘을 풀 수 있도록 문제를 내주는 사이트들이 정말 많습니다. 오늘은 그중에서 몇 가지만 소개해드리겠습니다. 사이트는 정말 많은데요, 그중에서 제가 최소 몇 번이라도 써본 사이트들만 소개하겠습니다. 더 좋은 사이트들이 있으면 소개해주시면 추가할 수 있을 것 같습니다.


@jayu108
jayu108 / datagridview_checkbox.cs
Last active June 26, 2020 11:47
datagridview 에 checkbox 표시하기, 일련번호 , 마우스로 column sizw 조절 못하게 하기.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;