Skip to content

Instantly share code, notes, and snippets.

View mu-hun's full-sized avatar
💡
No Silver Bullet

Mu hun mu-hun

💡
No Silver Bullet
View GitHub Profile
import styled from '@emotion/styled';
import React, from 'react';
import { variant } from 'styled-system';
import { BaseButton, BaseButtonProps } from '../../../private/BaseButton';
import { textVariants } from '../../../private/BaseText';
import { skipForwardProps } from '../../../props';
const kindVariants = {
primary: {
fontWeight: '700',
@RanolP
RanolP / inverse-type.ts
Last active November 19, 2019 02:01
I'd like to introduce the `Inverse` type in TypeScript.
// For Readibility, I've separated it into type.
type Keyable = string | number | symbol;
// Get value union type.
// for `{ a: true, b: 3 }` it will give you `boolean | number` type.
// Also for array, it will give you commonest type of the array.
type GetValueUnion<T> = T[keyof T];
// This type will inverse keys and values.
// for `{ a: 'str', b: 3 }` it will give you `{ 3: 'b', str: 'a' }` type.
@kiding
kiding / 2018-2019.diff
Created May 30, 2019 01:11
(2018|2019)년도 병역지정업체 선정 및 (2019|2020)년도 인원배정 고시
1,4c1,4
< ◉병무청고시제2018-1호
< 2018년도 병역지정업체 선정 및 2019년도 인원배정 고시
< 2018년도 병역지정업체 선정 및 2019년도 인원배정에 대하여 다음과 같이 고시합니다.
< 2018년 5월 23일
---
> ◉병무청고시 제2019-2호
> 2019년도 병역지정업체 선정 및 2020년도 인원배정 고시
> 2019년도 병역지정업체 선정 및 2020년도 인원배정에 대하여 다음과 같이 고시합니다.
> 2019년 5월 27일
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, 1, 0, -1 };
@HelloWorld017
HelloWorld017 / KAIST_courseRegistration.md
Last active March 14, 2024 14:26
카이스트 수강신청 뽀개기

카이스트 수강신청

NetFunnel

  • 트래픽을 관리하기 위한 하나의 솔루션, 흔히 보는 접속자 대기가 그것
  • https://traffic.kaist.ac.kr/ 에서 동작 중
    • 혹시 모르지만 서버 시간을 여기서 제공해준다.

GET https://traffic.kaist.ac.kr/ts.wseq

Global Params:

  • opcode: 실행할 명령어 이름 (Opcode Table 참고)
@RanolP
RanolP / bypass-original.js
Last active January 2, 2022 19:49
Bypass Screen Share Restriction in Guild on Discord.
(() => {
const data = [
[],
{
run: (_ignored1, _ignored2, { c: result }) => {
for (const field of Object.getOwnPropertyNames(result)) {
const exported = result[field].exports;
if (exported && exported.isDeveloper === false) {
Object.defineProperty(exported, "isDeveloper", {
value: true,
@johngrib
johngrib / contribution.sh
Created December 31, 2018 14:58
Show github contribution graph on terminal
#! /usr/local/bin/bash
MYGITHUB=johngrib
RAW=/tmp/$MYGITHUB-github
TABLE=/tmp/$MYGITHUB-github-table
COLORS=/tmp/$MYGITHUB-github-colors
curl -s https://github.com/$MYGITHUB/ > $RAW
TITLE=`cat /tmp/johngrib-github | pcregrep -M '[0-9,]+ contributions\s*\n\s*in the last year'`

Selective Restores on macOS

Note: This post is not yet finished

I have owned a Mac continuously for the last 8 years as part of my job and used it full time both professionally and personally. Over that time I have carried a lot of crap from machine to machine, and a lot of that was very work specific. Certs, credentials, applications, and other various configurations and files. I've always just performed a full Time Machine restore each time I upgraded.

I recently switched employers, and wanted to start mostly fresh, but with the ability to keep some of the more generic configurations on my Mac like VIM configurations, and the ability to bring over personal files. I wasn't sure how I was going to approach this at first. I imagined, that I would just take a Time Machine backup, perform a fresh install, and then use the Migration Assistant to uncheck some things I don't want.

Using the Time Machine backup and Migration Assistant, seemed like a great idea, although Migration Assistant doesn't give y

@skyzyx
skyzyx / single.html
Last active February 27, 2023 04:21
Hugo Partial for Generating the Table of Contents
...
{{- partial "toc.html" . -}}
...
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200: