Skip to content

Instantly share code, notes, and snippets.

View joonhwan's full-sized avatar
🏠
Working from home

joonhwan joonhwan

🏠
Working from home
View GitHub Profile
@joonhwan
joonhwan / DistributedReadWriteLock.cs
Last active October 20, 2024 23:50
distributed read write lock in c# / redis
using StackExchange.Redis;
namespace RedisLockTest;
public enum LockStatus
{
Success,
Failure,
Timeout
}
@joonhwan
joonhwan / keybindings.json
Created October 8, 2024 01:39 — forked from wojukasz/keybindings.json
VsCode + Vim keybindings and settings - best of both worlds
[
//
// VIM NAVIGATION SHORTCUTS
//
{
// "ctrl+h": Focuses on the left editor group when the text editor is focused, Vim extension is active, and Vim is not in Insert mode.
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
@joonhwan
joonhwan / python_logging.c
Created August 16, 2024 21:58 — forked from hensing/python_logging.c
Python: Use 'logging' module from C extension
#include <Python.h>
/***********************************************************/
/* define logging function and logtypes for python.logging */
/* by H.Dickten 2014 */
/***********************************************************/
enum logtypes {info, warning, error, debug};
static void log_msg(int type, char *msg)
{
@joonhwan
joonhwan / 1-init.cmd
Created March 3, 2024 13:22 — forked from RobbiNespu/1-init.cmd
Portable postgre SQL on windows
@ECHO ON
:: Save the directory where we are
pushd %CD%
echo %CD%
:: Shift directories to the correct path
%~d0
cd %~dp0
@joonhwan
joonhwan / init_postgres_windows.md
Last active February 29, 2024 23:10 — forked from jctosta/init_postgres_windows.md
A simple guide on initializing the Windows version of Postgres using the zip file instead of msi installer
@joonhwan
joonhwan / flask_matplotlib.py
Created July 31, 2022 04:24 — forked from illume/flask_matplotlib.py
Shows how to use flask and matplotlib together.
""" Shows how to use flask and matplotlib together.
Shows SVG, and png.
The SVG is easier to style with CSS, and hook JS events to in browser.
python3 -m venv venv
. ./venv/bin/activate
pip install flask matplotlib
python flask_matplotlib.py
"""
{
"vim.easymotion": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.sneak": true,
"vim.easymotionMarkerBackgroundColor": "#222",
"vim.normalModeKeyBindings": [
{
@joonhwan
joonhwan / _display-breakpoints.scss
Created March 14, 2021 06:29
display current breakpoint in lower left page
@mixin display-breakpoints {
&:after {
content: "xs";
position: fixed;
width: 30px;
font-size: 12px;
text-align: center;
background-color: black;
color: lime;
bottom: 0;
@joonhwan
joonhwan / README.md
Created February 9, 2021 01:47
Python Package 만들기 / 2021년2월

python 프로젝트 구성하기(python package 만들기)

pyproject.toml 작성

빌드시스템(디폴트는 setuptools 이지만, poetry, fitt 등 다른것도 있음) 구성과 관련해 필요한 패키지, 설정등이 들어감.

[build-system]
@joonhwan
joonhwan / hangul.ahk
Created January 5, 2021 01:43
윈도우즈 HHKB 사용시 사용하면 편리한 authokey
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;; 한자키 설정({vk19sc1F1})
Rwin::Send, {VK19} ; {vk19sc1F1}
;; 한글키 설정
RAlt::Send, {VK15} ;{vk15sc138}