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