Skip to content

Instantly share code, notes, and snippets.

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

Seol Park chalkpe

🏳️‍🌈
  • Republic of Korea
View GitHub Profile
🇰🇷 🇺🇸
뜨겁게 불타올랐던 마음 Heart of ember, autumntide
어느새 식고 잦아들어 Cooling swiftly, bleeding light
하지만 때를 기다려 Smold'ring softly, biding time
웅크린 채 고갤 들어 Marching forward, left behind
🇰🇷 🇺🇸
꺼져가는 생명의 불꽃 Fire as shadows clash
@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) },
awk -F, '{ gsub(/[" ]/, "", $2) } length($2) == 6 { print $2 }' Item.csv | uniq | sort > ffxiv-wordle.txt
@chalkpe
chalkpe / filter-best-parses.js
Last active August 5, 2021 16:15
filter best parses per job for FF Logs website
// ==UserScript==
// @name filter-best-parses
// @namespace https://gist.github.com/ChalkPE
// @version 1.0
// @description filter best parses per job for FF Logs website
// @match https://*.fflogs.com/*
// @run-at document-idle
// ==/UserScript==
(() => {
@chalkpe
chalkpe / 0-ffxiv.md
Last active August 1, 2021 02:25
초코보/초크

칭호

  • 궁극의 전설

종족 / 부족 / 성별

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

총사령부

  • 불멸대 대위
@chalkpe
chalkpe / amplify-commit-status-lambda.js
Last active July 9, 2021 13:50
Update AWS Amplify build statuses to connected GitHub repository via AWS Lambda + SNS
/**
* Required permissions:
* - GitHub PAT: `repo:status`
* - Function ARN: `amplify:GetApp`, `amplify:GetJob`
*/
const AWS = require('aws-sdk')
const { request } = require('https')
const { GITHUB_ACCESS_TOKEN } = process.env
@chalkpe
chalkpe / IPAddress.tsx
Last active May 17, 2021 10:05
React component for IP address w/ country flag emoji
import React from 'react';
import axios from 'axios';
import { countryCodeEmoji } from 'country-code-emoji';
type TextRenderer = (v: string) => React.ReactNode | string;
type SetCountry = React.Dispatch<React.SetStateAction<string>>;
type CountryEffect = (ip: string, setter: SetCountry) => void | (() => void);
interface IPAddressProps {
ip: string;
const mongoose = require('mongoose')
const User = mongoose.model('User', new mongoose.Schema({
name: String
}))
const Post = mongoose.model('Post', new mongoose.Schema({
title: String
}))
@chalkpe
chalkpe / LazyQRCode.tsx
Last active March 26, 2021 08:49
Lazy loaded version of `react-qr-code` npm package. Licensed under CC0.
import React from 'react';
import QRCode, { QRCodeProps } from 'react-qr-code';
interface LazyQRCodeProps extends QRCodeProps {
style?: React.CSSProperties;
children?: React.ReactNode;
}
export default ({ size, style, children, ...props }: LazyQRCodeProps) => {
const [loaded, setLoaded] = React.useState(false);
One brings shadow, one brings light

Two-toned echoes tumbling through time
시간을 따라 진동하는 두 울림

Threescore wasted, ten cast aside
아무런 의미 없이 버려진 시간

Four-fold knowing, no end in sight

끝은 도저히 보이지 않아