Skip to content

Instantly share code, notes, and snippets.

@realmovestar
realmovestar / ee.puml
Last active January 10, 2019 05:20
ee image
sprite $ee [135x132/16] {
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000
#!/bin/bash
# stdin에서 IP PORT 형식으로 입력 받아서 해당 서버에 접속가능한지 확인해줌.
check() {
echo -n "$1:$2 "
# timeout -k 5 5
nc -z -w 5 $1 $2 &> /dev/null \
&& echo -e '\e[32msucccess\e[0m' \
|| echo -e '\e[31mfail\e[0m'
}
# curl -s -o .editorconfig https://gist.githubusercontent.com/realmovestar/58eeaa8cfbe382b5f0b1d7338134eb5b/raw/cae4440cc24ac802c8e4bb2a27ab5d3ae34a79ce/.editorconfig
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true
set nocompatible
syntax on
" normal 모드에서는 영어만 입력된다.
set noimdisable
set belloff=all
set nu " number - 줄번호 보여주기
set rnu "relativenumber - 상대적 줄번호
@realmovestar
realmovestar / pyuniq.py
Created April 7, 2023 01:56
uniq using python
import sys
import json
counts = dict()
for line in sys.stdin:
if line in counts:
counts[line] += 1
else:
counts[line] = 1
@realmovestar
realmovestar / .tmux.conf
Last active October 17, 2023 06:28
tmux setting
# 참고자료
# https://www.apress.com/kr/book/9781484207765
# https://leanpub.com/the-tao-of-tmux/read
# Prefix Command 변경.
unbind C-b
set -g prefix C-Space
set -g default-terminal "screen-256color"