Skip to content

Instantly share code, notes, and snippets.

View mu-hun's full-sized avatar
🏠
Working from home

Kim mu-hun

🏠
Working from home
View GitHub Profile
# coding:utf-8
import random
meals = [
'ν˜„μ§€λ‹˜!',
'κ³±μ°½',
'(말없이 λ§ˆκ°μ€‘)',
'(μˆ˜λ©΄μ€‘)'
]
class Ayeong():
def __init__(self, name):
@mu-hun
mu-hun / sigon.css
Last active December 6, 2017 09:19
Heroes of the Storm memes for seogwipo.jje.hs.kr, YouTube : https://youtu.be/2AR-Z1QKcLw
/* ================================================================================================
KEYFRAMES
================================================================================================ */
@keyframes shake {
2% {
transform: translate(-0.5px, -0.5px) rotate(0.5deg);
}
4% {
transform: translate(2.5px, -1.5px) rotate(-0.5deg);
@mu-hun
mu-hun / map.js
Last active January 16, 2019 09:28
ES5 λ¬Έλ²•μœΌλ‘œ ν•¨μˆ˜ν˜• κ΅¬ν˜„ν•΄λ³΄κΈ°
function _map(list, fn) {
var eached = [];
for (var i = 0; i < list.length; i++) {
eached.push(fn(list[i]));
}
return eached;
}
@mu-hun
mu-hun / 32BIT.cpp
Created August 6, 2019 04:24
32λΉ„νŠΈ 컴퓨터 λ‚©ν’ˆν•˜κΈ° - κ°„λ‹¨ν•œ λΈŒλ£¨νŠΈν¬μŠ€μ™€ μˆœμ—΄ μ—°μŠ΅ 문제
#include <iostream>
#include <numeric>
#include <cmath>
using namespace std;
#define MAX 1000
int a[MAX], MONEY;
@mu-hun
mu-hun / Kirat.h
Created July 17, 2016 10:33
페이슀뢁 "μ½”λ”©κ³Ό λ¬΄κ΄€ν•©λ‹ˆλ‹€λ§Œ," 그룹의 μ•ˆμ§„μš©λ‹˜μ˜ "ν‚€λž.cpp"의 μ†ŒμŠ€λ₯Ό μ°Έμ‘°ν•œ ν—€λ”νŒŒμΌ
//λ†€λžκ²Œλ„ 이 ν—€λ”νŒŒμΌμ€ stdio.hλ§Œμ„ ν¬ν•¨ν•©λ‹ˆλ‹€ ν‚€λžβ˜…
//잘 μ‚¬μš©ν•΄μ£Όμ‹œκΈΈ λ°”λžλ‹ˆλ‹€ ν‚€λžβ˜…
#pragma once
#include <stdio.h>
#define ν‚€λžβ˜… ;
#define ν¬ν•¨ν•˜λ‹€ include
#define μ •μˆ˜ int
#define λ°›μ•„λž return
@mu-hun
mu-hun / demo.ts
Last active October 20, 2019 11:50
Grade-Point-Average parse demo for dreamy.jejunu.ac.kr
import request from 'request'
const student_no = 2018123456
const student_pw = 'PASSWORD'
const BaseURL = 'https://dreamy.jejunu.ac.kr'
const rejectUnauthorized = false
const headers = {
'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0',
import React, { FormEvent } from 'react'
const App: React.FC = () => {
const [flag, setFlag] = useState<boolean>()
const onSubmit = async (event: FormEvent) => {
event.preventDefault()
// @ts-ignore
const { value } = event.target.mailid // mailid is 'any' type
setFlag(await submitID(value))
}
return (
interface FormElements extends HTMLFormElement {
mailid: HTMLInputElement
}
interface FormTarget extends FormEvent<HTMLFormElement> {
target: FormElements
}
const App: React.FC = () => {
const [flag, setFlag] = useState<boolean>()
@mu-hun
mu-hun / DeleteComment.js
Last active November 14, 2019 04:02
넀이버 카페 λŒ“κΈ€ 및 κ²Œμ‹œκΈ€ μ‚­μ œ μžλ™ν™” 슀크립트 //κ³°κ³°κ³°λ‹€λ¦¬λ°±κ°œ
const INTERVAL = 250
const x = document.getElementById('cafe_main').contentWindow.document.getElementById('innerNetwork').contentWindow
(function next(interval) {
if (x.document.querySelector('span.m-tcol-c.list-count') === null || x.document.querySelector('td.m-tcol-c').firstChild.data === "μž‘μ„±ν•˜μ‹  λŒ“κΈ€μ΄ μ—†μŠ΅λ‹ˆλ‹€.") return
x.confirm = () => true
if (!x.document.getElementById('selectAll').checked)
x.document.getElementById('selectAll').click()
const isEqual = <T extends number | string>(first: T[], second: T[]) =>
first.length === second.length &&
first.findIndex((item, index) => item !== second[index]) === -1;
const isEqualVariableArray = <T>(...arrays: T[][]) => arrays.slice(0, arrays.length - 1).findIndex((array, index) => !isEqual<T>(array, arrays[index+1]))
console.assert(isEqualVariableArray<number>([1, 2], [1, 2], [1, 2]))