This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html version=5> | |
<head> | |
<style type="text/css"> | |
svg{height:22mm} | |
svg path{stroke:#eee;stroke-width:0.1;stroke-linecap:round} | |
#t00 #c, #t00 #e, #t00 #j, #t00 #n{stroke:black} | |
#t01 #c, #t01 #e, #t01 #j, #t01 #l, #t01 #n{stroke:black} | |
#t02 #m, #t02 #q, #t02 #v, #t02 #x{stroke:black} | |
#t03 #m, #t03 #o, #t03 #q, #t03 #v, #t03 #x{stroke:black} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# eval-for-environ COMMAND [VARIABLE...] | |
# Evaluates COMMAND using sh then arranges for rc to learn the values | |
# of each of the environment variables VARIABLE.... This will break if | |
# the value of any VARIABLE may contain a quote ('). | |
fn eval-for-environ{ | |
cmd=$1 | |
shift | |
for(var){ | |
cmd=($cmd ';' echo $var'=\''"$(echo $'$var' | sed s/\''/\''\''/g)"\''') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/plan9/bin/rc | |
if(! ~ $#* 1){ | |
echo usage: $0 domain >/dev/stderr | |
echo Gets a username and password from factotum. $0 prints '''ok username password''' if a key matching '''role=client proto=pass dom=DOMAIN user? !password?''' is known to factotum or if factotum can prompt for a key. | fmt >/dev/stderr | |
exit usage | |
} | |
tmp=`{mktemp -d --tmpdir getpw.XXXXXXXXXX} | |
f=$tmp/fifo | |
mkfifo -m 600 $f | |
{{echo start 'role=client' 'proto=pass' 'dom='^$1 'user?' '!password?'; awk -F ' ' '/done/{exit} /ok/{print "read"; fflush(); if(length($2) > 0) print $0 >"/dev/stderr"} /needkey/{print $0 >"/dev/stderr"; exit $0}' <$f} | 9p rdwr factotum/rpc >[2]/dev/null >$f} >[2=1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/plan9/bin/rc | |
9 ls -F `{du -a $home/wallpapers | awk '{print $2}'} | grep -v '/$' | 9 fortune /dev/stdin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Secstore server | |
[Service] | |
Type=forking | |
ExecStart=/usr/lib/plan9/bin/secstored -s tcp!*!secstore | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/plan9/bin/rc | |
. /usr/local/plan9/lib/acme.rc | |
winname `{pwd}^/$1 | |
winctl clean | |
winctl get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/plan9/bin/rc | |
# Passes all arguments to plan9port's man(1); if that fails, try the unix man(1) instead. | |
9 man $* >[2]/dev/null || u man $* | 9 sed -e 's/([^ ]+)[ ]+/\1 /g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/plan9/bin/rc | |
opt=() | |
while(~ $1 -* && ! ~ $1 --){ | |
opt=($opt $1) | |
shift | |
} | |
if(~ $1 --){ | |
shift | |
opt=($opt -e) | |
} |