Skip to content

Instantly share code, notes, and snippets.

View rhee's full-sized avatar

Sang-Hoon RHEE rhee

View GitHub Profile
@rhee
rhee / proc_stdout_gen.py
Created May 16, 2022 01:08 — forked from rhee-elten/proc_stdout_gen.py
## gen() function for proc.stdout ( run_commands, vdl_run ) ## async read from proc.stdout
## gen() function for proc.stdout ( run_commands, vdl_run )
## async read from proc.stdout
if True:
def gen(proc):
remains = b'' # remaining from prev read
while proc.poll() is None:
rlist, _, _ = select([proc.stdout],[],[],500)
if proc.stdout not in rlist:
continue
data = os.read(proc.stdout.fileno(), 16384)
@rhee
rhee / tmux.md
Created February 6, 2022 22:48 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a