Skip to content

Instantly share code, notes, and snippets.

View anaclumos's full-sized avatar

Sunghyun Cho anaclumos

View GitHub Profile
@anaclumos
anaclumos / karabiner.json
Last active February 11, 2023 08:25
Use fn(globe) to control + command + space
{
"title": "Use fn(globe) to control + command + space",
"rules": [
{
"description": "Use fn(globe) to control + command + space",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "fn"
echo "Hey there!"
@anaclumos
anaclumos / GitHub3.css
Created February 4, 2023 00:07 — forked from devxoul/GitHub3.css
GitHub CSS for MacDown
/*
* GitHub CSS for MacDown
* https://gist.github.com/devxoul/8df5792ce330985a633b
* http://sindresorhus.com/github-markdown-css/
*/
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYF
@anaclumos
anaclumos / toggle.css
Created October 12, 2022 21:48
iOS Style Toggle in CSS
* {
--ios-style-checkbox-width: 3rem;
--ios-style-checkbox-height: 1.8rem;
--ios-style-checkbox-enabled-color: var(
--primary-color-500
);
--ifm-toc-padding-vertical: 0.25rem;
--ifm-toc-padding-horizontal: 0.75rem;
--ios-style-checkbox-enabled-border-color: var(
--primary-color-200

Keybase proof

I hereby claim:

  • I am anaclumos on github.
  • I am anaclumos (https://keybase.io/anaclumos) on keybase.
  • I have a public key ASDdY7O37dlCTJM18gVtSh9ELsmfdMorXPA6GdSFQo86Qwo

To claim this, I am signing this object:

@anaclumos
anaclumos / pythonFileSize.py
Created April 16, 2020 16:35
Get Python File Size in Readable Format
def size(path, kilo=1000):
total_size = 0
for dirpath, dirnames, filenames in os.walk(path):
for i in filenames:
f = os.path.join(dirpath, i)
total_size += os.path.getsize(f)
if total_size < kilo:
return str(total_size)
elif total_size < kilo ** 2:
return str(int(total_size / kilo)) + "KB " + str(int(total_size % kilo)) + "B"
@anaclumos
anaclumos / RH.java
Last active July 31, 2022 19:47
Silicon Valley S06 E04 Richard Hendricks Sorted List Brute Force Search Code
(R. Hendricks 112) int index = 0;
(R. Hendricks 113) while (!element.equals(sortedList.get(index))
(R. Hendricks 114) && sortedList.size() > ++index);
(R. Hendricks 115) return index < sortedList.size() ? index : -1;
@anaclumos
anaclumos / anonymize.py
Created October 23, 2019 02:57
For Blog: Anonymize.py @ MinsaPay
import pandas as pd
Dataframe = pd.read_csv('raw.csv')
def anonymize(df, targetColumn):
anon = {}
id = 0
for x in range(len(df)):
user = df.loc[x, targetColumn]
if user in anon:
df.loc[x, targetColumn] = anon[user]
@anaclumos
anaclumos / UseSystemFontForEnglish.css
Created October 23, 2019 01:20
Spoqa Sans 영문 폰트가 (Noto) 마음에 들지 않아서 영문의 경우 시스템 폰트를 쓰도록 만든 CSS
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 400;
src: local('Spoqa Han Sans Regular'), url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.woff2') format('woff2'), url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.woff') format('woff'), url('https://cdn.jsdelivr.net/gh/spoqa/spoqa-han-sans@01ff0283e4f36e159ffbf744b36e16ef742da6d8/Subset/SpoqaHanSans/SpoqaHanSansRegular.ttf') format('truetype');
unicode-range: U+AC00-D7AF, U+0000-0040, U+005B-0060, U+007B-007F
}
@font-face {
font-family: 'Spoqa Han Sans';
font-weight: 300;