Skip to content

Instantly share code, notes, and snippets.

View enghqii's full-sized avatar

Chanwoo enghqii

  • NEXON KOREA
  • South Korea
View GitHub Profile
@enghqii
enghqii / oldfy.py
Created June 8, 2020 07:27
A python script that overwrites file creation time
#! /usr/bin/python
import os, sys
import platform
import time
# pip install pypiwin32
import pywintypes, win32file, win32con
@enghqii
enghqii / multiple_hole.geojson
Last active April 3, 2019 07:57
GeoJson with multiple holes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@enghqii
enghqii / redirect.js
Last active May 25, 2018 06:02
Redirect Reddit (grease monkey script)
// ==UserScript==
// @name Redirect Reddit
// @version 1
// @grant none
// @include http://www.reddit.com/*
// @include https://www.reddit.com/*
// ==/UserScript==
console.log("redirecting");
@enghqii
enghqii / main.lua
Created May 7, 2017 16:25
The art of computer programming vol.1 coroutine example in lua (3 passes)
INPUT = "A2B5E3426FG0ZYW3210PQ89R."
-- Registers
CH = nil
NUM = nil
COUNTER = 0
READ_INDEX = 1
WRITE_INDEX = 1
@enghqii
enghqii / fb_sanitizer.js
Created March 4, 2017 13:20
Facebook newsfeed sanitizer
// ==UserScript==
// @name fb_sanitizer
// @namespace enghqii
// @description make clean facebook newsfeed
// @include https://www.facebook.com/
// @version 1
// @grant none
// ==/UserScript==
function sanitize() {
@enghqii
enghqii / ParallaxMappingShader.shader
Created September 30, 2016 13:54
Parallax mapping unity custom shader
Shader "Custom/ParallaxMapShader" {
Properties{
_Color("Color", Color) = (1,1,1,1)
_LightColor("LightColor", Color) = (1,1,1,1)
_MainTex("Albedo (RGB)", 2D) = "white" {}
_ParallaxMap("_ParallaxMap (RGB)", 2D) = "white" {}
_NormalMap("NormalMap", 2D) = "white" {}
_MainLightPosition("MainLightPosition", Vector) = (0,0,0,0)
_HeightScale("height scale", Float) = 0.01
}
@enghqii
enghqii / main.lua
Created August 30, 2016 10:26
Lua Coroutine Example
queue = {}
queue_max = 100
producer = coroutine.create(function ()
while #queue < queue_max do
local item = "Hello! "..#queue
table.insert(queue, item)
-- print(item .. " inserted")
end
@enghqii
enghqii / Program.cs
Created August 29, 2016 18:15
C# Coroutine example
using System;
using System.Collections;
using System.Collections.Generic;
namespace Generator3
{
class Program
{
// classic Generator
static IEnumerable<string> Script()
@enghqii
enghqii / crawler.py
Created August 16, 2016 14:24
Rust playtime crawler
import sys
import pymongo
import requests
from bs4 import BeautifulSoup
from datetime import datetime
if len(sys.argv) < 2 :
print("need player id, abort.")
exit()
@enghqii
enghqii / SAT.js
Last active April 28, 2024 23:58
SAT (Separating Axis Theorem) collision detection using PIXI.js
// initializing
var renderer = PIXI.autoDetectRenderer(800, 600, { antialias: true, backgroundColor : 0xf7f7f7 });
renderer.view.style.borderStyle = "solid";
renderer.view.style.borderColor = "#bbbbbb";
renderer.view.style.borderWidth = "1px";
document.body.appendChild(renderer.view);
// create the root of the scene graph
var stage = new PIXI.Container();
stage.interactive = true;