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 / build.gradle
Last active December 12, 2024 00:44
build.gradle snippet for queryDsl
dependencies {
implementation "com.querydsl:querydsl-jpa"
implementation "com.querydsl:querydsl-core"
implementation "com.querydsl:querydsl-collections"
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa" // querydsl JPAAnnotationProcessor
annotationProcessor "jakarta.annotation:jakarta.annotation-api" // This prevents java.lang.NoClassDefFoundError
annotationProcessor "jakarta.persistence:jakarta.persistence-api" // This prevents java.lang.NoClassDefFoundError
}
@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 / 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 / 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 / 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

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 / 20220627-spring-boot-application-configuration-data-desc.adoc
Created November 4, 2022 09:34 — forked from ihoneymon/20220627-spring-boot-application-configuration-data-desc.adoc
์Šคํ”„๋ง ๋ถ€ํŠธ ๊ตฌ์„ฑํŒŒ์ผ ๋ฐ์ดํ„ฐ ์ ์žฌ ๊ฐ„๋‹จ์„ค๋ช…

์Šคํ”„๋ง ๋ถ€ํŠธ ๊ตฌ์„ฑ์†์„ฑ ์ด์šฉ(Spring Boot External Configuration)

์Šคํ”„๋ง ๋ถ€ํŠธ์—์„œ๋Š” ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ํ•„์š”ํ•œ ์†์„ฑ์„ "์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ตฌ์„ฑํŒŒ์ผ" application.yml(ํ˜น์€ applicatoin.properties) ์— ์ž‘์„ฑํ•˜์—ฌ ํ™œ์šฉํ•ฉ๋‹ˆ๋‹ค.

Note

๋ฐ์ดํ„ฐ๊ตฌ์กฐ๋ฅผ ๊ณ„์ธตํ˜•์œผ๋กœ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์–ด์„œ ๊ฐœ์ธ์ ์œผ๋กœ .properties ํŒŒ์ผ ๋ณด๋‹ค๋Š” .yml(YAML) ํŒŒ์ผ ์ด์šฉ์„ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค.

@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