Skip to content

Instantly share code, notes, and snippets.

View eoghanmcilwaine's full-sized avatar

Eoghan McIlwaine eoghanmcilwaine

View GitHub Profile
@eoghanmcilwaine
eoghanmcilwaine / hide-slides.user.js
Created July 26, 2016 16:21
Hide .slides-control once it's available on page
function x() {
if(!document.querySelector('.slides-control')) {
setTimeout(x, 100);
} else {
document.querySelector('.slides-control').style.display = 'none';
}
}
x();
@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.
*/