Skip to content

Instantly share code, notes, and snippets.

View hrickards's full-sized avatar

Harry Rickards hrickards

View GitHub Profile
@hrickards
hrickards / mandelbrot.html
Created January 31, 2012 11:04 — forked from mchapman/mandelbrot.html
Mandelbrot Canvas
<html>
<head>
<script type="text/javascript">
window.onload = function() {
var mandelbrotCanvas = document.getElementById('mandelbrotCanvas');
var context = mandelbrotCanvas.getContext('2d');
var width = mandelbrotCanvas.width;
var height = mandelbrotCanvas.height;
// Mostly copied from http://bost.ocks.org/mike/nations/
// Various accessors that specify the four dimensions of data to visualize.
function x(d) { return d.x; }
function y(d) { return d.y; }
function radius(d) { return d.radius; }
function color(d) { return d.color; }
function key(d) { return d.name; }
// Chart dimensions.
@hrickards
hrickards / cycle-pem.sh
Last active March 8, 2017 20:22 — forked from jsachs/cycle-pem.sh
shell script to replace authorized_keys in an EC2 instance
#!/bin/bash
# this script should be used in a dir with both the old
# private key and the new public key
oldpem=$1
user=$2
newpub=$3
newpem=$4
@hrickards
hrickards / 01_centos7_amis.json
Created June 2, 2017 13:48 — forked from gene1wood/AWS-CentOS-6-7-8-8-Stream-AMIs.md
AWS CloudFormation CentOS 7 AMIs
{
"Mappings": {
"RegionMap": {
"ap-northeast-1": {
"CentOS7x8664EBSHVM": "ami-eec1c380"
},
"ap-northeast-2": {
"CentOS7x8664EBSHVM": "ami-c74789a9"
},
"ap-south-1": {