Skip to content

Instantly share code, notes, and snippets.

Kang Seonghoon lifthrasiir

Block or report user

Report or block lifthrasiir

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lifthrasiir
lifthrasiir / stalk.py
Created Apr 19, 2020
Failed attempt to thoroughly analyze the Stalk Market with Z3
View stalk.py
from z3 import *
from ctypes import c_float
import random
import math
import time
def roll(a, b, c, d):
n = a ^ ((a << 11) & 0xffffffff)
return n ^ (n >> 8) ^ d ^ (d >> 19)
View cb-to-columns.py
# 2020-02-13 Kang Seonghoon
# Public Domain
import os
import xml.etree.ElementTree as ET
from collections import namedtuple
class Entry(namedtuple('Entry', 'category emergency lang')):
def __repr__(self):
return f'{self.category}{"!" if self.emergency else ""}{"#" if self.lang else ""}'
View eagate-captcha-solver.user.js
// ==UserScript==
// @name eagate captcha solver
// @namespace about:eagate-captcha-solver
// @version 0
// @match https://p.eagate.573.jp/gate/p/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
let g_observer;
@lifthrasiir
lifthrasiir / 00-README.md
Last active Jul 30, 2019
Unofficial English translation of Korean texts related to the metatron incident
View 00-README.md

I (Kang Seonghoon) have provided several translations to Github in light of the metatron incident, as Github staffs keep the investigation. I've reproduced my crude translations below (modulo formatting).

Please keep in mind that this is NOT the official translation. Any mistranslation or mistake is mine. Hopefully this should be at least better than Google Translate though.

@lifthrasiir
lifthrasiir / sumprod.c
Created Jun 7, 2019
reasonably efficient enumerator for https://oeis.org/A033178
View sumprod.c
#include <stdio.h>
#include <stdlib.h>
int recur(int n, int m, int k, int prevsum, int prevprod) {
if (m <= 0 || prevprod >= n) return 0;
int sum = prevsum + k, prod = prevprod * k, rem = (sum + m - 1) - prod;
int count = (rem >= 0 && prevprod > 1 && rem % (prevprod - 1) == 0);
for (; sum <= 2 * n && prod < n; ++k, ++sum, prod += prevprod) count += recur(n, m - 1, k, sum, prod);
return count;
}
@lifthrasiir
lifthrasiir / oeis.txt
Created May 9, 2019
(Partial) References to 176 OEIS Sequences from http://golf.horse/oeis/
View oeis.txt
# 001478 -n from -1
# 001489 -n from 0
# 000004 0
# 004526 floor(n/2)
# 002620 floor(n^2/4)
# 001057 interleaved 0 -1 -2... & 1 2 3...
# 000035 0 1 0 1...
# 010060 parity from 0
# 000014 series-reduced trees
# 001221 # distinct primes dividing n
@lifthrasiir
lifthrasiir / daerim.md
Last active May 23, 2019
<대림동에서 보낸 서른 번의 밤>의 웹 호환성 문제에 대해 (2019-02-03)
View daerim.md

아래 내용은 지난 2월 3일 webmaster@sisain.co.kr에 보낸 메일을 거의 그대로 전재한 것이다. 두 달 넘게 응답은 없었다.

10일 넘게 응답을 받지 못한 뒤 김동인 담당 기자에게 트위터로 연락을 시도했으나 이 또한 응답받지 못했다.

해당 기사는 현재도 여전히 파이어폭스에서 정상적으로 표시되지 않는다. (2019-04-15)

안녕하세요. [<대림동에서 보낸 서른 번의 밤>][1] 기사를 보고 사소하지만 중요할 수 있는 문제를 알려 드리고자 글을 씁니다.

본 기사는 (요즈음에는 뉴욕타임즈 따위가 너무 많이 써서 오히려 식상할 수 있는) 스크롤할 때마다 애니메이션이 튀어 나오는 인터랙티브 포맷을 쓰고 있습니다만, 해당 포맷이 구글 크롬에서만 테스트된 것으로 보입니다. 모든 브라우저를 테스트하진

@lifthrasiir
lifthrasiir / TweetNaCl.cs
Created May 7, 2018
Semi-direct translation of TweetNaCl 20140427 (public domain)
View TweetNaCl.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
namespace TweetNaCl
{
static class NaCl
{
public const int SECRET_BOX_KEY_BYTES = 32;
@lifthrasiir
lifthrasiir / gvim.sh
Last active Nov 8, 2017
Running Windows gvim.exe from WSL
View gvim.sh
gvim() {
local args rawargs path base usegvim=1 noopt=
declare -a args
rawargs=("$@")
while (($#)); do
case "$noopt$1" in
-[cSdirsTuUwW]|--cmd|--remote-expr|--remote-send|--servername|--version)
args[${#args[@]}]="$1"
rawargs[${#args[@]}]="$1"
shift
@lifthrasiir
lifthrasiir / alphabet.md
Last active Nov 26, 2017
The "Options" Alphabet
View alphabet.md
You can’t perform that action at this time.