Skip to content

Instantly share code, notes, and snippets.

View sh-cho's full-sized avatar
πŸ’¬
I may be slow to respond.

Seonghyeon Cho (μ‘°μ„±ν˜„) sh-cho

πŸ’¬
I may be slow to respond.
View GitHub Profile
@sh-cho
sh-cho / laftel-collapsible-comments.user.js
Last active August 17, 2024 02:40
Make Laftel comments collapsible. Userscript for Violentmonkey (tamplermonkey, etc.)
// ==UserScript==
// @name Laftel collapsible comments
// @name:ko-KR 라프텔 λŒ“κΈ€ μ ‘κΈ°
// @description Make Laftel comments collapsible
// @description:ko-KR 라프텔 μ—ν”Όμ†Œλ“œμ—μ„œ λŒ“κΈ€μ„ μ ‘κ³  펼칠 수 있게 μˆ˜μ •ν•©λ‹ˆλ‹€
// @namespace https://laftel.net/
// @match https://laftel.net/*
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// @grant none
// @icon https://static.laftel.net/favicon.ico
@sh-cho
sh-cho / lint.yml
Created June 11, 2022 17:11
gdscript lint workflow using gdtoolkit
name: lint
on:
pull_request:
push:
branches-ignore:
- gh-pages
jobs:
gdlint:
@sh-cho
sh-cho / temurin.sh
Last active October 14, 2021 10:05
# Untap AdoptOpenJDK first
brew untap AdoptOpenJDK/openjdk
# If you want to download latest version
brew install --cask temurin
# To install specific version
brew tap homebrew/cask-versions
brew install --cask temurin8 temurin11
@sh-cho
sh-cho / daum.py
Created February 13, 2021 10:49
daum webtoon scraper using selenium
import time
import urllib.request
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
VIEWER_PATH = "http://webtoon.daum.net/webtoon/viewer/"
Java πŸ•“ 36h45m β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹β–‘β–‘β–‘ 85.2%
Java Properties πŸ•“ 2h33m β–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 5.9%
Properties πŸ•“ 1h42m β–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 4.0%
HTML πŸ•“ 1h14m β–‹β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 2.9%
SQL πŸ•“ 21m ▏░░░░░░░░░░░░░░░░░░░░░ 0.8%
@sh-cho
sh-cho / concat.c
Last active November 5, 2017 11:49
c string concatenation using snprintf
#include <stdio.h>
#include <string.h>
int main() {
char prefix[100];
snprintf(prefix, sizeof(prefix), "%s-%s", "main-for","abc");
printf("%s\n", prefix);
return 0;
}
@sh-cho
sh-cho / torrent2magnet.py
Created October 15, 2017 14:28
extract magnet address from torrent file in python 3
# python3
import magneturi
TORRENT_FILE_NAME = 'ubuntu-16.04.3-desktop-amd64.iso.torrent'
def main():
print(magneturi.from_torrent_file(TORRENT_FILE_NAME))
if __name__ == '__main__':
main()
@sh-cho
sh-cho / wordcount.l
Created October 15, 2017 06:27
flex wordcount example
/* declaration and option settings */
%{
void addWord(char *text);
void addNewLine(void);
void addChar(void);
int chars = 0;
int words = 0;
int lines = 0;
%}
@sh-cho
sh-cho / pokemon-db-parser.py
Last active September 26, 2017 14:14
pokemon db parser
# parser for this problem (https://www.acmicpc.net/problem/9987)
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
url = "http://web.archive.org/web/20140301191716/http://pokemondb.net/pokedex/national"
soup = BeautifulSoup(requests.get(url).text, 'lxml')
list = soup.find_all('span', {'class': 'infocard-tall '})
db = []