Skip to content

Instantly share code, notes, and snippets.

@greymd
Last active May 12, 2017 07:55
Show Gist options
  • Save greymd/d9e1f2778e06f2ca7ff1ec37bd3121a7 to your computer and use it in GitHub Desktop.
Save greymd/d9e1f2778e06f2ca7ff1ec37bd3121a7 to your computer and use it in GitHub Desktop.
play with tmux-xpanes
```
mkfifo /tmp/p{1..4} 2>/dev/null; sleep 1; while true; do echo ハゲ; sleep 1 ;done | tee /tmp/p1
stdbuf -oL cat /tmp/p1 | stdbuf -oL sed -n = | tee /tmp/p2
stdbuf -oL cat /tmp/p2 | stdbuf -oL factor | stdbuf -oL tee /tmp/p3
stdbuf -oL cat /tmp/p3 | while read n; do echo $n | awk 'NF==2{print $2;}'; done
```
cat cmd | xpanes -e
cure precures | cure tr '[:precure_name:]' '[:girl_name:]' | nl | awk '{print "sleep "$1"; cure echo -p "$2" | say -v Kyoko"}' | xpanes -e
```
sleep 1; curl localhost:8080
while true; do nc -l 8080 <<<$'\\n'ping$'\\n' &>/dev/null && sleep 1 && curl localhost:8081 ;done
while true; do nc -l 8081 <<<$'\\n'pong$'\\n' &>/dev/null && sleep 1 && curl localhost:8080 ;done
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment