Instantly share code, notes, and snippets.

View TweetNaCl.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
namespace TweetNaCl
{
static class NaCl
{
public const int SECRET_BOX_KEY_BYTES = 32;
View gvim.sh
gvim() {
local args rawargs path base usegvim=1 noopt=
declare -a args
rawargs=("$@")
while (($#)); do
case "$noopt$1" in
-[cSdirsTuUwW]|--cmd|--remote-expr|--remote-send|--servername|--version)
args[${#args[@]}]="$1"
rawargs[${#args[@]}]="$1"
shift
View alphabet.md
View normal.py
# coding=utf-8
import sys
import os.path
from collections import defaultdict
try:
ucd = sys.argv[1]
except IndexError:
print >>sys.stderr, 'Usage: %s <ucd path>' % sys.argv[0]
View now.1m.sh
This file has been truncated, but you can view the full file.
#!/bin/bash
read hour min tm <<<$(date '+%-H %-M %s')
CLOCKS=(πŸ• πŸ•‘ πŸ•’ πŸ•“ πŸ•” πŸ•• πŸ•– πŸ•— πŸ•˜ πŸ•™ πŸ•š πŸ•› πŸ•œ πŸ• πŸ•ž πŸ•Ÿ πŸ•  πŸ•‘ πŸ•’ πŸ•£ πŸ•€ πŸ•₯ πŸ•¦ πŸ•§)
CLOCK_IDX=$[(hour+11)%12+min/30*12]
NOW_IDX=$[(tm-42750)/900%96]
echo ${CLOCKS[$CLOCK_IDX]}
echo ---
echo '| href="https://xkcd.com/now" image='$(grep "^$(printf %02d $NOW_IDX):" "$0" | cut -b4-)
exit
View now.1m.sh
This file has been truncated, but you can view the full file.
#!/bin/bash
# Kang Seonghoon, 2017-06-01, public domain
# (except for embedded images from xkcd, which is CC-by-nc 2.5)
read hour min tm <<<$(date '+%-H %-M %s')
CLOCKS=(πŸ• πŸ•‘ πŸ•’ πŸ•“ πŸ•” πŸ•• πŸ•– πŸ•— πŸ•˜ πŸ•™ πŸ•š πŸ•› πŸ•œ πŸ• πŸ•ž πŸ•Ÿ πŸ•  πŸ•‘ πŸ•’ πŸ•£ πŸ•€ πŸ•₯ πŸ•¦ πŸ•§)
CLOCK_IDX=$[(hour+11)%12+min/30*12]
NOW_IDX=$[(tm-42750)/900%96]
echo ${CLOCKS[$CLOCK_IDX]}
echo ---
View powerlv.py
import sys
import string
import md5
import base64
def power_level(s):
return digest(md5.md5(base64.b64encode(s)))
def digest(m):
h = bytearray(m.digest())
View inquiry.md

μ•„λž˜ 메일은 2017-02-12 21:43(μ΄ν•˜ ν•œκ΅­ ν‘œμ€€μ‹œ)에 ν•œκ²¨λ ˆ 기사에 λŒ€ν•œ μ˜κ²¬μœΌλ‘œμ„œ 기사에 μ œμ‹œλœ κΉ€μž¬μ„­ 기자의 λ©”μΌλ‘œ 보낸 λ‚΄μš©μ΄λ‹€. λ©”μΌμ—μ„œ 사싀 관계 λ“±μ˜ 였λ₯˜κ°€ μžˆλ‹€λ©΄ λͺ¨λ‘ λ‚˜μ˜ μ‹€μˆ˜μ΄λ‹€.

2017-02-13 14:53에 λ§λΆ™μž„: 더 이상 gistλ₯Ό λΉ„κ³΅κ°œλ‘œ ν•  μ΄μœ κ°€ μ—†μ–΄μ‘ŒμœΌλ―€λ‘œ 곡개둜 μ „ν™˜. 이 메일에 λŒ€ν•œ 닡변은 λ°›μ•˜μœΌλ‚˜ κ³΅κ°œν•  만큼 μ€‘μš”ν•œ 반둠이 λ“€μ–΄ μžˆμ§„ μ•ŠμœΌλ©° 곡개 여뢀도 묻지 μ•Šμ•˜μœΌλ―€λ‘œ κ³΅κ°œν•˜μ§€ μ•ŠλŠ”λ‹€. μ•„λž˜ κΈ€ μžμ²΄μ—λ„ λ‹€μ–‘ν•œ λΉ„λ¬Έκ³Ό μ˜€μžκ°€ μžˆμœΌλ‚˜ 본래 보낸 λ‚΄μš©μ„ 살리기 μœ„ν•΄ μ „ν˜€ μˆ˜μ •μ„ ν•˜μ§€ μ•ŠκΈ°λ‘œ ν–ˆμŒμ„ μ–‘ν•΄ λ°”λžŒ.

2017-02-13 19:00에 λ§λΆ™μž„: 이 κΈ°μ‚¬μ˜ ν›„μ†μœΌλ‘œ ꡬ글코리아 츑의 κΈ°μžκ°„λ‹΄νšŒκ°€ μ˜¬λΌκ°”λ‹€. μƒˆ 기사에 λŒ€ν•΄μ„œλŠ” νŠΉμ΄ν•œ 게 μ—†μœΌλ―€λ‘œ λ…Έμ½”λ©˜νŠΈ. λ˜ν•œ μœ„μ˜ 기사 링크λ₯Ό λ―Έλ””μ–΄λ‹€μŒμ—μ„œ ν•œκ²¨λ ˆ μ›Ήμ‚¬μ΄νŠΈλ‘œ 가도둝 μˆ˜μ •.

원문

μ•ˆλ…•ν•˜μ‹­λ‹ˆκΉŒ, κ·€ν•˜κ»˜μ„œ μž‘μ„±ν•˜μ‹  (λ¬Όλ‘  μ €λŠ” κ·Έ μ§„μœ„λ₯Ό μ•Œ 수 μ—†μŠ΅λ‹ˆλ‹€λ§Œ, 적어도 κ·Έλ ‡κ²Œ λ‚˜μ™€ μžˆλŠ”) 기사에 λŒ€ν•œ μ˜κ²¬μ„ μ œκΈ°ν•˜κ³ μž 메일을 μ”λ‹ˆλ‹€. 이 메일은 μ €μ˜ 개인 의견이며 μ €λ₯Ό κ³ μš©ν•˜κ³  μžˆλŠ” νšŒμ‚¬λ‚˜ 단체 λ“±μ˜ μ˜κ²¬μ„ μ „ν˜€ λŒ€λ³€ν•˜μ§€ μ•ŠμŒμ„ ν˜Ήμ‹œλ‚˜ μ‹Άμ§€λ§Œ 미리 λ°ν˜€ λ‘‘λ‹ˆλ‹€.

View temporenc.c
// Example implementation for the proposed Temporenc byte format
// Kang Seonghoon, 2017-01-29, public domain
#include <stdint.h>
#include <stddef.h>
#include <string.h>
struct temporenc {
int has_date: 1, has_year: 1, has_mon: 1, has_day: 1;
int has_time: 1, has_hour: 1, has_min: 1, has_sec: 1, has_nsec: 1;
View grid.txt
| / Antidiagonals
|/_
Horizontals m l k j i h g
\ ,-------------. f Clues:
---} a / . . . . . . . \ e Ha .*H.*H.* Aa .*SE.*UE.* Da .*G.*V.*H.*
/ b / . . . . . . . . \ d Hb (DI|NS|TH|OM)* Ab .*LR.*RL.* Db [CR]*
c / . . . . . . . . . \ c Hc F.*[AO].*[AO].* Ac .*OXR.* Dc .*XEXM*
d / . . . . . . . . . . \ b Hd (O|RHH|MM)* Ad ([^EMC]|EM)* Dd .*DD.*CCM.*
e / . . . . . . . . . . . \ a He .* Ae (HHX|[^HX])* De .*XHCR.*X.*
f / . . . . . . . . . . . . \ Hf C*MC(CCC|MM)* Af .*PRR.*DDC.* Df .*(.)(.)(.)(.)\4\3\2\1.*