Skip to content

Instantly share code, notes, and snippets.

@deki
deki / cloud9-php7.4.sh
Created May 2, 2021 20:02
Installs PHP 7.4 in AWS Cloud 9 with Amazon Linux 2
#!/usr/bin/env bash
sudo amazon-linux-extras disable php7.2
sudo amazon-linux-extras disable lamp-mariadb10.2-php7.2
sudo amazon-linux-extras install -y php7.4
@eoghanmcilwaine
eoghanmcilwaine / getPoint.php
Created April 12, 2012 23:43
PHP function to get a point from given origin point, angle and distance
/**
* Get a point <var>dist</var> units away from <var>$cx</var>,<var>$cy</var>
* on angle <var>$ang</var>.
*
* @param {number} $cx The x coordinate of the origin point.
* @param {number} $cy The y coordinate of the origin point.
* @param {number} $ang Angle from the origin point to the returned point, in degrees.
* @param {number} $dist Unit distance from the origin point to the returned point.
* @return {array} x and y coordinates of the return point.
*/