Skip to content

Instantly share code, notes, and snippets.

View Y-k-Y's full-sized avatar
🏊
I can swim!

YeoKyung Yoon Y-k-Y

🏊
I can swim!
View GitHub Profile
@Y-k-Y
Y-k-Y / capture.py
Created May 30, 2024 02:23
Workaround to avoid way to bright frame while using Lepton camera
import cv2
import subprocess
import numpy as np
# I'm using this package for convenience detecting and capturing Lepton camera. It's not neccessary tho.
from flirpy.camera.lepton import Lepton
def ktoc(val):
return (val - 27315) / 100.0

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

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

Note

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

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@Y-k-Y
Y-k-Y / check-styles.xml
Created June 19, 2022 05:03
Custom checkstyles config file based on google with custom indentation
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html
Checkstyle is very configurable. Be sure to read the documentation at
@Y-k-Y
Y-k-Y / AdbCommands
Created June 17, 2022 06:46 — forked from dswapnil104/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@Y-k-Y
Y-k-Y / nginx.conf
Last active April 14, 2022 07:58
SSL configuration for strong security.
########################################################################
# from https://cipherli.st/ #
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html #
########################################################################
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
@Y-k-Y
Y-k-Y / ClientInfo.java
Last active July 6, 2021 06:51 — forked from c0rp-aubakirov/ClientInfo.java
How to get full client info using servlet request, including client IP, browser, os, use-agent and referer
@RequiredArgsConstructor
public class HttpClientUtil {
private final HttpServletRequest request;
private final String[] HEADERS_TO_TRY_TO_GET_IP = {
"X-Forwarded-For",
"Proxy-Client-IP",
"WL-Proxy-Client-IP",
"HTTP_X_FORWARDED_FOR",
@Y-k-Y
Y-k-Y / build.gradle
Last active April 14, 2022 07:59
build.gradle snippet for queryDsl
def querydslVersion = '4.4.0'
dependencies {
implementation group: 'com.querydsl', name: 'querydsl-jpa', version: querydslVersion
implementation group: 'com.querydsl', name: 'querydsl-apt', version: querydslVersion
implementation group: 'com.querydsl', name: 'querydsl-core', version: querydslVersion
annotationProcessor group: 'com.querydsl', name: 'querydsl-apt', version: querydslVersion
annotationProcessor group: 'com.querydsl', name: 'querydsl-apt', version: querydslVersion, classifier: 'jpa'
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'