Skip to content

Instantly share code, notes, and snippets.

@bertabus-zz
bertabus-zz / HaversinFormula.go
Created March 13, 2016 22:46 — forked from cdipaolo/HaversinFormula.go
Golang functions to calculate the distance in meters between long,lat points on Earth.
// haversin(θ) function
func hsin(theta float64) float64 {
return math.Pow(math.Sin(theta/2), 2)
}
// Distance function returns the distance (in meters) between two points of
// a given longitude and latitude relatively accurately (using a spherical
// approximation of the Earth) through the Haversin Distance Formula for
// great arc distance on a sphere with accuracy for small distances
//

Setting up a SSL Cert from Comodo

I use Namecheap.com <https://namecheap.com>_ as a registrar, and they resale SSL Certs from a number of other companies, including Comodo <http://www.comodo.com/>_.

These are the steps I went through to set up an SSL cert.

Purchase the cert

ArchLinux Installation guide

This will use GPT partitions and GRUB2 on a BIOS enabled PC (see Wiki for EFI). The Installation Guide can be found at /root/install.txt.

Prepare USB stick

Get 2012.08.04 image or later from http://www.archlinux.org/download. Following tutorial requires at least 2011.07.15 image.

dd if=/dev/zero of=/dev/sdx bs=1k count=1