Skip to content

Instantly share code, notes, and snippets.

View EricSeokgon's full-sized avatar
๐ŸŽฏ
Focusing

Eric EricSeokgon

๐ŸŽฏ
Focusing
View GitHub Profile
@nakov
nakov / ECDSA-secp256k1-example.java
Last active January 12, 2026 03:35
ECDSA with secp256k1 in Java: generate ECC keys, sign, verify
import org.bouncycastle.util.encoders.Hex;
import org.web3j.crypto.*;
import java.math.BigInteger;
public class ECCExample {
public static String compressPubKey(BigInteger pubKey) {
String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02";
String pubKeyHex = pubKey.toString(16);
String pubKeyX = pubKeyHex.substring(0, 64);
@sirodoht
sirodoht / migrate-django.md
Last active September 22, 2025 17:30
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.ImprovedNamingStrategy;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
import org.springframework.util.FileCopyUtils;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.ImprovedNamingStrategy;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.H2Dialect;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
import org.springframework.util.FileCopyUtils;
@bishboria
bishboria / springer-free-maths-books.md
Last active March 18, 2026 03:40
Springer made a bunch of books available for free, these were the direct links
@ihoneymon
ihoneymon / 20150916_tdd_agenda.md
Last active June 2, 2020 21:48
TDD(Test Driven Development): ํ…Œ์ŠคํŠธ์ฃผ๋„ ๊ฐœ๋ฐœ์„ ์ด์•ผ๊ธฐํ•˜๋‹ค

TDD(Test Driven Development): ํ…Œ์ŠคํŠธ์ฃผ๋„ ๊ฐœ๋ฐœ์„ ์ด์•ผ๊ธฐํ•˜๋‹ค

TDD๋ž€ ๋ฌด์—‡์ธ๊ฐ€?

TDD์™€ ๋‹จ์œ„ํ…Œ์ŠคํŠธ๋Š” ๊ฐ™์€ ๊ฒƒ์ด ์•„๋‹ˆ๋‹ค.

TDD ์ž‘์„ฑ ํŒจํ„ด

  • ํ”„๋กœ๊ทธ๋žจ์„ ์ž‘์„ฑํ•˜๊ธฐ ์ „์— ํ…Œ์ŠคํŠธ ๋จผ์ €ํ•˜๋ผ.
  • ์ž˜ ๋™์ž‘ํ•˜๋Š” ๊น”๋”ํ•œ ์ฝ”๋“œ
  • ์งˆ๋ฌธ -> ์‘๋‹ต -> ์ •์ œ -> ๋ฐ˜๋ณต
@ihoneymon
ihoneymon / springboot-introduction.md
Last active October 14, 2022 08:44
์Šคํ”„๋ง๋ถ€ํŠธ ์†Œ๊ฐœ

์Šคํ”„๋ง๋ถ€ํŠธ ์†Œ๊ฐœ

0. ์Šคํ”„๋ง๋ถ€ํŠธSpringBoot๋ž€?

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

  • ์Šคํ”„๋ง๋ถ€ํŠธ๋Š” ๋‹จ๋…์‹คํ–‰๋˜๋Š”, ์‹คํ–‰ํ•˜๊ธฐ๋งŒ ํ•˜๋ฉด ๋˜๋Š” ์ƒ์šฉํ™” ๊ฐ€๋Šฅํ•œ ์ˆ˜์ค€์˜, ์Šคํ”„๋ง ๊ธฐ๋ฐ˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‰ฝ๊ฒŒ ๋งŒ๋“ค์–ด๋‚ผ ์ˆ˜ ์žˆ๋‹ค.
  • ์ตœ์†Œํ•œ์˜ ์„ค์ •์œผ๋กœ ์Šคํ”„๋ง ํ”Œ๋žซํผ๊ณผ ์„œ๋“œํŒŒํ‹ฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๊ณ  ์žˆ๋‹ค.
@karpathy
karpathy / min-char-rnn.py
Last active March 19, 2026 15:31
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@benelog
benelog / h2-config.md
Last active May 11, 2019 15:58
h2 DB์‚ฌ์šฉ๋ฒ•

๋ณ„๋„์˜ DB์„ค์น˜ ์—†์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์–ด์„œ, ํ…Œ์ŠคํŠธ, ๊ต์œก์šฉ, ํŒจํ‚ค์ง€์šฉ ์†Œํ”„ํŠธ์›จ์–ด์—์„œ ์‚ฌ์šฉํ•ง๋งŒํ•˜๋‹ค.

1. ์˜์กด์„ฑ ์ถ”๊ฐ€

pom.xml์— ์ถ”๊ฐ€ํ•œ๋‹ค.

<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <version>1.4.181</version>