## Clone all of an organization's GitHub repositories

Something like this should do:

for u in $(hub api --paginate orgs/$ORGNAME/repos | jq '.[].ssh_url' | sed -e 's/"//g'); do echo $u; git clone "$u"; done

## Find listeners on localhost

Find everything running on localhost that's listening for a connection:

sudo lsof -i -P | grep LISTEN

## MySQL database sizes

I'm going to forget this, so blogging it for the future.

SELECT
table_schema AS 'Database',
ROUND(SUM(data_length) / 1024 / 1024, 2) AS 'Data',
ROUND(SUM(index_length) / 1024 / 1024, 2) AS 'Indexes',
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS 'Total'
FROM
information_schema.TABLES
GROUP BY table_schema;

## Julia Set of sin(z)

This is a rendering of the Julia set for $z' = c \sin(z)$ where $c=1+0.2 i$.

This version includes gamma correction for improved contrast ($\gamma = 0.3$), a linear scaling of the colours from darkest to lightest, and $8x8$ sub-pixel sampling to generate a high-quality antialiased image. It might take a long time to complete rendering.

## Thorn Fractal

Paul Bourke has some images and explanation of the thorn fractal. This implementation features over sampling, gamma correction, iterative improvement, and it's open source.

The Julia set version of this fractal is generated by computing the escape time for the functions

$$x_{n+1} = \frac{x_n}{\cos(y_n)} + c_x$$

$$y_{n+1} = \frac{y_n}{\sin(x_n)}+ c_y$$

I look forward to trying a Mandelbrot version of the fractal soon.