Menu Home

Reservoir Sampling with bash

So I have a fairly extensive .bashrc file, and one thing you might notice while scrolling through it, is that I have a whole bunch of “step-in” functions. These are functions that replicate some other command for some reason. Primarily this is because I work on both Linux and Solaris, […]

[INFO] rand: Updates made

As some of you know, I went to a bit of effort to create a script that tries as many ways as possible to generate random numbers. Some would say I went a bit too far. Overboard. So to speak. So recently I’ve been working on rewriting my passphrase generator […]

Analysing lotto numbers

New Zealand’s first Lotto broadcast, if you were interested. So I’m at home fighting a cold. In between cups of lemon+ginger tea with a bit of honey and ingesting whatever seemingly useful drugs I can find, I decided that I needed to do something. Anything. Lying in bed all day […]

Generating lotto numbers

A client joked today about predicting lotto numbers. This post doesn’t claim to do that, obviously, but I realised that I can use my rand script to generate some random lotto numbers. Obviously the below adheres to the NZ Lotto format of 6 numbers under 40, a bonus ball under […]

Portably(ish) generating random integers

[160309/20:49][rawiri@minty ~]$ rand -h rand – generate random positive integers Optional Arguments: -c [count. Number of numbers (Default:1)] -d [debug. Tells you which processing method is used (Default:off)] -h [help] -m [minimum number (Default:1)] -M [maximum number (Default:9223372036854775807)] TL;DR: I made a script that should generate a random integer for […]

Beating the vendor by 3 weeks

So a client has a vendor supplied python script that routinely connects to said vendor’s servers and downloads files. I won’t go into too much detail, but it’s a pretty important file transfer with far reaching financial influence, and we’ll leave it exactly at that. So, as you can guess […]