Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Calculates the great-circle distance between two points
* using the Haversine formula.
*
* @param float $latitudeFrom Latitude of start point in [deg decimal]
* @param float $longitudeFrom Longitude of start point in [deg decimal]
* @param float $latitudeTo Latitude of target point in [deg decimal]
* @param float $longitudeTo Longitude of target point in [deg decimal]
@ivmelo
ivmelo / omniorbpy-tutorial.md
Last active June 6, 2016 03:40
Instalando omniORBpy no Mac OSX (Ou Ubuntu)

Como compilar e instalar o omniORBpy no Mac OSX (e ubuntu).

Neste tutorial usei as seguintes ferramentas

  • omniORB 4.2.0
  • omniORBpy 4.2.0
  • Mac OSX El Capitan (ou Ubuntu 12.10)
  • Python 2.7
  • Xcode e Xcode Command Line Tools (Caso esteja usando Mac OSX).
  1. Primeiro, baixe os pacotes omniORB 4.2.0 e omniORBpy 4.2.0 do seguinte link:
@ivmelo
ivmelo / installing_mcrypt_osx_yosemite.md
Last active December 7, 2015 15:41
Installing mcrypt extesion on OS X Yosemite

Installing Mcrypt on OS X Yosemite

Installing the mcrypt extension for PHP on OSX Yosemite can be a real headache. I've tried several differents ways and this was the only one that really worked with no errors. If you are having trouble just like I was, try these steps and hopefully it will work for you.

First of all, you will need Xcode and the Xcode Command Line Tools installed on your machine. If you don’t have them, download Xcode from the AppStore, if you already have Xcode installed, you can run

$ xcode-select —install

to install the command line tools. You’ll get a message if you already have it installed.