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
| https://github.com/cjdelisle/cjdns/issues/341 | |
| 1st time I've reported a bug here on github rather than using email or reportbug | |
| -- that shows I should use github a little bit^W^Wlot more... |
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
| #! /bin/sh | |
| # Original msgs edited or stripped (they were in italian); | |
| # iirc knoppix localizes sell scripts, I don't care. | |
| zdie() { | |
| zenity --error --text="$*" --no-markup | |
| exit 123 | |
| } |
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
| " http://www.burtleburtle.net/bob/c/readable.c | |
| " ---------------------------------------------------------------------------- | |
| " readable.c: My random number generator, ISAAC. | |
| " (c) Bob Jenkins, March 1996, Public Domain | |
| " You may use this code in any way you wish, and it is free. No warrantee. | |
| " * May 2008 -- made it not depend on standard.h | |
| " ---------------------------------------------------------------------------- | |
| " /* a ub4 is an unsigned 4-byte quantity */ | |
| " typedef uint32_t ub4 |
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
| #! /bin/sh | |
| # Marsaglia's favorite PRNG, see his 20/01/99 post on sci.stat.math at | |
| # https://groups.google.com/forum/?fromgroups=#!topic/sci.crypt/yoaCpGWKEk0 | |
| # https://en.wikipedia.org/wiki/Random_number_generation#Computational_methods | |
| # = API = | |
| # marsaglia_seed [w] [z] / both non-zero | |
| # marsaglia() returns a random uint32 in $RAND | |
| # -- can't use $RANDOM, setting it means seeding the PRNG in bash/ksh/zsh |
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
| " https://groups.google.com/forum/?hl=en&fromgroups=#!topic/sci.physics/SWhCr8SEVWw | |
| " TLDR: a PRNG by Dan Bernstein ported to vimscript | |
| " The generator shown below is faster than Marsaglia's on my Pentium-100. | |
| " It passes the Diehard tests without trouble. | |
| " | |
| " Use RANDOM for one 32-bit random number. Do not use RANDOM twice in one | |
| " line. You can put a 64-bit seed into random_in[2 and 3]. The effect of | |
| " seed m is to jump ahead by 2^68 m in a single sequence of period 2^132. | |
| " It's easy to determine the seed from the sequence, but not with the sort |
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
| " I like picking a random colorscheme, but I hate the way it's done in most vim scripts | |
| " -- localtime(), system("echo $RANDOM"), etc etc. | |
| " And I wanted to try this gist thing... | |
| function! DevUrandom() | |
| let rv = 0 | |
| " readline reads 4096 bytes at a time(think fread()) | |
| " and returns a *list* of lines. | |
| " Don't only read one line because: | |
| " - we read more anyway, and | |
| " - a short line means 0 has 1/256 probability rather than 1/4G! |
NewerOlder