Skip to content

Instantly share code, notes, and snippets.

View hdavid0510's full-sized avatar
🐢
I may be slow to respond.

David.Hong hdavid0510

🐢
I may be slow to respond.
View GitHub Profile
@hdavid0510
hdavid0510 / wsl2-portforward.ps1
Last active September 17, 2023 06:06 — forked from hoonoh/wsl2-portforward.ps1
wsl2 port forwarding script
#DEBUG/ To check script running time
$start = Get-date
Write-Host "Obtaining WSL2 IP address" -foreground cyan;
$remoteAddr = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteAddr -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteAddr = $matches[0];
@hdavid0510
hdavid0510 / markdown-text-101.md
Created September 5, 2023 13:51 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

a=0
b=0
c=0
d=0
e=0
f=0
t=0
@hdavid0510
hdavid0510 / RPi_I2C_driver.py
Created July 8, 2020 19:21 — forked from DenisFromHR/RPi_I2C_driver.py
RaspberryPi I2C LCD Python stuff
# -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# added bits and pieces from various sources
# By DenisFromHR (Denis Pleic)
@hdavid0510
hdavid0510 / omok.c
Created April 26, 2017 05:46
오목게임 소스입니다. 배열을 통해 오목판을 구현하였고, 오목판 배열의 주솟값과 커서 배열(X, Y)의 두 좌푯값을 대응시켜서 커서를 구현했습니다. 오목칸 사이사이의 넓이가 넓은 오목판과 좁은 오목판이 있으며 이는 주석처리를 통해 원하는 오목판 그리기 함수를 고름으로써 취사선택할 수 있습니다. 육목 이상의 판정은 승리로 인정되지 않으며, 3-3금지는 아직 구현하지 못했습니다.
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define UP 72
#define LEFT 75
#define DOWN 80
#define RIGHT 77
#define SPACE 32
#define ENTER 13