Skip to content

Instantly share code, notes, and snippets.

View chalkpe's full-sized avatar
🏳️‍🌈

Seol Park chalkpe

🏳️‍🌈
  • Republic of Korea
View GitHub Profile
@chalkpe
chalkpe / calculate.kt
Created April 1, 2018 12:37
코틀린으로 사칙연산
import java.math.BigDecimal
import java.math.MathContext
fun main (args: Array<String>) {
println(calculate("0" + readLine()))
}
val operators: Map<Char, (BigDecimal, BigDecimal) -> BigDecimal> = sortedMapOf(
'+' to { a, b -> a.add(b) },
'-' to { a, b -> a.minus(b) },
const axios = require('axios')
const chatId = ???
const token = '???'
const api = 'https://api.telegram.org'
const page = 'https://www.ubuntu.com/download/desktop'
const delay = t => new Promise((res, rej) => setTimeout(res, t))
async function wow () {
@chalkpe
chalkpe / input.js
Last active April 27, 2018 06:44
dimigo assignment
function* read (n) {
while ((n = Number(prompt('enter a number')))) yield n }
const main = (arr = [...read()].sort((a, b) => a - b)) =>
console.log('arr:', arr.slice(), '\nmin:', arr.shift(), '\nmax:', arr.pop())
@chalkpe
chalkpe / m.md
Last active June 8, 2018 07:12
마프 수행

모터 특징

  • DC 모터: 압력 전류 방향으로 방향 제어, 고회전에 유리, RC카 등
  • 서보 모터: PWM 신호로 0-180도 위치 설정 가능, 제한적 범위; 정확한 위치 제어, 로봇 관절 등 회전각 제어
  • 스텝 모터: 방향 속도 + 회전각 정밀 제어. 제어 복잡. 고회전보단 정밀 제어. 3D 프린터 등

8*8 매트릭스

Rx에 high를 주었을 때 Cy에서 high가 읽히면 버튼x y가 눌린 것

byte R[4] = { ?, ?, ?, ? };
setInterval((_ = Date.now() / 30 % 360) =>
console.clear() || console.log('%c[Warning]', `
font-size: 500%;
font-weight: bold;
color: hsl(${_}, 100%, 90%);
background-color: hsl(${_}, 100%, 30%);
text-shadow: .08em .08em hsl(${_}, 100%, 20%)`), 75)
@chalkpe
chalkpe / trig-func-table.js
Created September 6, 2018 14:00
JavaScript code that displays the table of natural trigonometric functions to a browser console.
const R = Math.PI / 180
const S = [0, 30, 45, 60, 90]
const T = ['sin', 'cos', 'tan']
const range = n => [...Array(n).keys()]
const merge = oo => Object.assign({}, ...oo)
const rad = (f, a) => Math[f](a * R).toFixed(8)
const inf = x =>
x > Number.MAX_SAFE_INTEGER && Number.POSITIVE_INFINITY ||
[57] 감자볼
[41] 감자볼튀김
[38] 돈육감자조림
[34] 감자탕
[28] 감자튀김
[28] 메쉬드포테이토
[20] 감자채볶음
[19] 회오리감자
[18] 감자조림
[18] 주름감자
/* fit resize handle position */
body.overlay::after {
right: 0.25rem;
bottom: 0.25rem;
}
/* round border */
nav > .container {
@chalkpe
chalkpe / 0-ffxiv.md
Last active August 1, 2021 02:25
초코보/초크

칭호

  • 궁극의 전설

종족 / 부족 / 성별

  • 라라펠 / 사막 부족 / ♂
  • 미코테 / 태양의 추종자 / ♂

총사령부

  • 불멸대 대위
@chalkpe
chalkpe / kt-egg.md
Last active February 4, 2019 18:01

KT 에그 간단 설명

모든 요청 기본값

  • POST http://192.168.1.1/cgi-bin/webmain.cgi
  • Content-Type: multipart/form-data

로그인 세션 얻기

요청

이름