Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pretty easy thing but too hard for me! (random array element)
- X-seq: zsh-users 11698
- From: fREW <frioux@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: pretty easy thing but too hard for me! (random array element)
- Date: Thu, 2 Aug 2007 14:25:22 -0600
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EaC1PRgDETL7YyLP6AFkb58//Q7vQTrB0QRN38Vcpv3AWorHJ0Oud3uwUHhAtWh7bV8sQZdyLZ4ooQO9O7ZtD/mEt3MebogtuGTs7J3YsLAPHS5Kb2Z3oTUYO91QTUTzbbcuuTk5f62EBFsdQU1qeN/pOgnwsPIj+Up/9AHeb4c=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jTU8a4QYXNz292TBm1i9w9xRJ4fkgFwh0ODBOndjy/16NXXZM1Y6qo0O4KAnISrxxfFuk99/o2hPQunhriCX20qQcZzsy85UPgVhkSra/J/h6Ua39e/GFRYTWI7YlnsSR3m7FkoCx1RQUO0fYbGT7djyCIZgNRP1t7ODNmqhqwg=
- In-reply-to: <20070802015226.GC32551@princo>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <31611186004384@xxxxxxxxxxxxxxxxxxx> <fb3648c60708011447o3100794esded1e427ce8dd32d@xxxxxxxxxxxxxx> <20070802015226.GC32551@princo>
> Would you mind sharing that awesome off-list reply
> with the rest of us?
If you want complete awesomeness (sorry, didn't realize it was
originally off-list) you at least need all of the files:
#!/usr/bin/ruby -w
Fromat = "http://www.qwantz.com/comics/comic2-%02i.png"
2.upto(1072) do |i|
`wget #{sprintf(Fromat, i)}`
sleep 1
end
and then do this in your .zshrc
if [[ -x ~/personal/dino ]]; then
dinoray=( ~/personal/dino/* )
alias dino='feh $dinoray[$RANDOM%$#dinoray+1]'
fi
and then you can type dino and get a random comic!
--
-fREW
Messages sorted by:
Reverse Date,
Date,
Thread,
Author