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
@hibiyasleep
hibiyasleep / calcium-tweet.js
Last active May 4, 2017 08:44
calcium-tweet
#!/usr/bin/env node
'use strict'
const calcium = require('calcium')
const moment = require('moment')
const fs = require('fs')
const T = require('twit')
const rc = JSON.parse(fs.readFileSync('/home/hibiya/.calciumrc').toString())
#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 };
@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일
@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.

Before reading, please consider I have poor English writing skills. Sorry. :(

What is 'Magenta'?

'Magenta' is Python script, which are made to crash PocketMine-MP servers, exactly PocketMine-Raklib.

How is it possible?

To understand this, you should know how Raklib's session system is working. Raklib creates every session per IP/Port to manage each clients, and these sessions are PHP objects.

They have many properties, such as $messageIndex, $address, $port, etc. What we need to play with is $preJoinQueue[] array. This contains MCPE DataPackets before a server-client handshake, and all stored packets will be processed after the connection process is completed. (See This)

@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,

깃 커밋 서명하는법

A. PGP key pair 등록

기존에 원래 사용하던 PGP key pair가 없을경우 새로 만들어야한다. 이미 key pair가 있을경우, 비밀키를 컴퓨터에 다운로드 해줘야한다.

A.1. 새 키 만드는법[^1]

$ gpg --generate-key
@sokcuri
sokcuri / key.md
Last active July 9, 2022 10:39
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

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',
@marocchino
marocchino / 094607.md
Last active July 19, 2022 14:25
ES6시대의 JavaScript

ES6시대의 JavaScript

안녕하세요. 사원사업부의 마루야마@h13i32maru입니다. 최근의 Web 프론트엔드의 변화는 매우 격렬해서, 조금 눈을 땐 사이에 점점 새로운 것이 나오고 있더라구요. 그런 격렬한 변화중 하나가 ES6이라는 차세대 JavaScript의 사양입니다. 이 ES6는 현재 재정중으로 집필시점에서는 Draft Rev31이 공개되어있습니다.

JavaScript는 ECMAScript(ECMA262)라는 사양을 기반으로 구현되어있습니다. 현재 모던한 Web 브라우저는 ECMAScript 5.1th Edition을 기반으로 한 JavaScript실행 엔진을 탑재하고 있습니다. 그리고 다음 버전인 ECMAScript 6th Edition이 현재 재정중으로, 약칭으로 ES6이라는 명칭이 사용되고 있습니다.