tnx-termcast - scripts - random scripts HTML git clone https://git.parazyd.org/scripts DIR Log DIR Files DIR Refs --- tnx-termcast (561B) --- 1 #!/bin/sh 2 # 3 # parazyd - (c) wtfpl 2016 4 # 5 # start recording a script and upload it in base64 6 # usage: nx-termcast [url] 7 8 nx_upload() { 9 curl -sLT${1:--} https://p.iotek.org 10 } 11 12 nx_record() { 13 script --timing=timing typescript 14 # make a motherfucking tarbomb 15 tar cz . | base64 | nx_upload 16 } 17 18 nx_replay() { 19 curl -s "$*" | base64 -d | tar xz 20 scriptreplay timing typescript 21 } 22 23 # that's to prevent the motherfucking tarbombs 24 cd $(mktemp -d) 25 26 # give the impression of a clean session 27 28 # either record or play, your choice 29 test -n "$1" && nx_replay "$*" || nx_record