2-layer tmux 구조로, 외부(base)와 내부(inner) tmux를 중첩 실행하여 prefix 충돌 없이 독립적으로 관리한다.
~/.config/tmux/
├── common.conf # 공통 설정 (양쪽 레이어가 source)
├── tmux.conf # inner layer (prefix: C-a)
| #!/usr/bin/env bash | |
| function token_to_array() { | |
| local -n array=$1 | |
| local str=$2 | |
| local i=0 c quote start=0 | |
| while [ $i -lt ${#str} ]; do | |
| c=${str:$i:1} | |
| case "$c" in | |
| \\) i=$(( i + 1 )) |
| defscrollback 10000 | |
| autodetach on | |
| vbell on | |
| hardstatus alwayslastline | |
| hardstatus string '%{= kg}[ %{y}%H %{g}][%= %{=kw}%?%-w%?%{y}(%{W}%n*%t%?(%u)%?%{y})%{g}%?%+w%?%?%= %{g}][ %{y}%Y-%m-%d %{W}%c %D %{g}]' | |
| escape ^Aa | |
| #shell bash |
| #include <stdio.h> | |
| #include <time.h> | |
| #define NSUB (1L<<32) | |
| #define NBIT 48 | |
| //#define NSUB (1<<4) | |
| //#define NBIT 8 | |
| #define COUNT(isub, iseg) (isub*((long)NSUB)+iseg) | |
| #define PRINT_COUNT(msg, count) printf("%s: iSub= %ld\tcount= %ld\tr1= %ld\tr2=%ld\telapse= %f\n", msg, isub, count, r1, r2, elapse) | |
| #define PRINT(msg) PRINT_COUNT(msg, COUNT(isub, iseg)) |
| foo ?= default | |
| override foo += added | |
| export foo | |
| all:: | |
| @echo outer: foo is "$(foo)" | |
| @$(MAKE) -s -f sub-make.mk |
| #!/bin/bash | |
| function ensure_privileged_or_exit() { | |
| local cap_mask="0x00000007ffffffff" | |
| local cap_bnd=0x$(grep ^CapBnd /proc/self/status | awk '{print $2}') | |
| if [[ $(($cap_mask & $cap_bnd )) != $(($cap_mask)) ]]; then | |
| echo -e "[ERROR] Run with --privileged option." | |
| exit 1 | |
| fi | |
| } |
| { | |
| "title": "Change fn + esc to grave_accent_and_tilde", | |
| "rules": [ | |
| { | |
| "description": "Change fn + esc grave_accent_and_tilde", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "escape", |
| vim -c TOhtml -c wq -c q TxJSON.cxx | |
| vim -c 'hardcopy > o1.ps' -c q TxJSON.cxx | |
| a2ps --pro=color -o o2.ps TxJSON.cxx |
| ------------------------------------------------- == ------------------------------------------------- == | |
| nench.sh v2018.04.14 -- https://git.io/nench.sh == nench.sh v2018.04.14 -- https://git.io/nench.sh == | |
| benchmark timestamp: 2018-11-18 10:05:43 UTC == benchmark timestamp: 2018-11-18 10:06:45 UTC == | |
| ------------------------------------------------- == ------------------------------------------------- == | |
| == == | |
| Processor: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz == Processor: Virtual CPU 714389bda930 == | |
| CPU cores: 1 |
| #!/bin/bash | |
| find "$1" -d | while read x; do | |
| basename=$(basename "$x") | |
| dirname=$(dirname "$x") | |
| newname=$(echo $basename | iconv -c -f utf-8 -t cp866 | iconv -f cp949 -t utf-8) | |
| if [ "$basename" != "$newname" ];then | |
| mv "$dirname/$basename" "$dirname/$newname" | |
| fi | |
| done |