Skip to content

Instantly share code, notes, and snippets.

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

Hoon Kim hoonsubin

🏠
Working from home
View GitHub Profile
@hoonsubin
hoonsubin / README.md
Last active September 3, 2021 10:13
How to install Hyper-V on Windows 10 and 11

Introduction

I know it's hard to believe, but there are situations where you must use Windows as the host machine for development purposes. In an ideal world, we can use VirtualBox on a Hyper-V-enabled host without performance downgrade. But we don't live in a perfect world (unless you have money to buy VMware), so we'll have to work with what we got. If you still want to play games on your Windows host, use WSL2, and run a full GNU/Linux environment, you should give Hyper-V a shot. You can learn more about Microsoft Hyper-V from the following links:

System Requirements

@hoonsubin
hoonsubin / keybase.md
Created July 27, 2021 11:51
Keybase GitHub account ownership proof

Keybase proof

I hereby claim:

  • I am hoonsubin on github.
  • I am hoonkim (https://keybase.io/hoonkim) on keybase.
  • I have a public key whose fingerprint is 6BEE 4916 3B8C 0374 B9ED BFA9 C262 F1E2 272D 3CB7

To claim this, I am signing this object:

@hoonsubin
hoonsubin / extensions.json
Last active April 20, 2021 05:34
VS Code extension and settings backup
[
{
"identifier": {
"id": "vscode.bat"
},
"version": "1.0.0"
},
{
"identifier": {
"id": "vscode.clojure"
@hoonsubin
hoonsubin / TopDown2DProjectileMotion.cs
Last active March 15, 2021 13:36
A Unity game component for simulating a 3D projectile arc in 2D world space
using UnityEngine;
public class TopDown2DProjectileMotion : MonoBehaviour
{
public Rigidbody2D throwTarget;
public float throwRadious = 6f;
public float maxThrowHeight = 3f;
public float gravityMultiplier = -18;
@hoonsubin
hoonsubin / UnityPathUtil.cs
Last active March 3, 2021 09:12
A simple utility to create a full path from the given point with all the directory change
using System.Collections.Generic;
using System.IO;
using System;
namespace HoonKim.Editor
{
public static class UnityPathUtil
{
/// <summary>
/// Path utility that combines the original path with the relative path with all the directory change operations.
@hoonsubin
hoonsubin / SimpleAuction.sol
Created October 22, 2020 11:51
simple auction example for Solidity
pragma solidity ^0.4.22;
contract SimpleAuction {
// Parameters of the auction. Times are either
// absolute unix timestamps (seconds since 1970-01-01)
// or time periods in seconds.
address public beneficiary;
uint public auctionEnd;
// Current state of the auction.
@hoonsubin
hoonsubin / generatePlmAddress.ts
Last active April 13, 2021 19:11
generates a Plasm public address with the given ECDSA public key
/**
* generates a Plasm public address with the given ethereum public key
* @param ethPubKey an compressed ECDSA public key. With or without the 0x prefix
*/
export function generatePlmAddress(publicKey: string) {
// converts a given hex string into Uint8Array
const toByteArray = (hexString: string) => {
const result = [];
for (let i = 0; i < hexString.length; i += 2) {
result.push(parseInt(hexString.substr(i, 2), 16));