Skip to content

Instantly share code, notes, and snippets.

View ArrayIterator's full-sized avatar

ArrayIterator ArrayIterator

View GitHub Profile
@ArrayIterator
ArrayIterator / geoip_update.php
Created May 6, 2020 20:18
Maxmind GeoIP Updater (Based PHP)
#!/usr/bin/env php
<?php
/**
* GeoIP Legacy Download & Updated from https://www.miyuru.lk/geoiplegacy
* Change $path or put on /usr/share/GeoIP
* This script will replace GeoIP.dat, GeoIPCity.dat & GeoIPASNum.dat
* NGINX CONFIG:
http {
.... // etc
geoip_country /usr/share/GeoIP/GeoIP.dat;
<?php
namespace ArrayIterator\Currency\Daily;
class Eu
{
const API_URI = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml';
/**
* @var string
*/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ArrayIterator
ArrayIterator / east-java.json
Created March 24, 2020 02:58
GEOJSON (East Java)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ArrayIterator
ArrayIterator / ArrayEmailVerifier.php
Created February 26, 2020 07:26
Verify Email Existences Via Port 25
<?php
namespace ArrayIterator\Email;
/**
* Class ArrayEmailVerifier
* @package ArrayIterator\Email
*/
class ArrayEmailVerifier
{
protected $debugCLI = false;
@ArrayIterator
ArrayIterator / leaflet.LatLng.bearingTo.js
Created February 19, 2020 17:20
Add Bearing (Rotation Based) to Leaflet LatLng
/**
* @see https://github.com/gregallensworth/Leaflet/blob/master/LatLng_Bearings.js
*/
L.LatLng.prototype.bearingTo = function(LatLng) {
let d2r = Math.PI / 180;
let r2d = 180 / Math.PI;
let lat1 = this.lat * d2r;
let lat2 = LatLng.lat * d2r;
let dLon = (LatLng.lng-this.lng) * d2r;
let y = Math.sin(dLon) * Math.cos(lat2);
@ArrayIterator
ArrayIterator / PolygonFixer.php
Created February 19, 2020 08:02
Fix Right Hand Rule Geo JSON clockwise
<?php
declare(strict_types=1);
namespace ArrayIterator;
/**
* Class PolygonFixer
* @package ArrayIterator
* Like a Geo Jeon right-hand-rule Fixer based on {@link https://mapster.me/right-hand-rule-geojson-fixer/}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ArrayIterator
ArrayIterator / REFERENCE.MD
Created February 12, 2020 17:39
ISO - 8601 + 4217 + 3166
@ArrayIterator
ArrayIterator / ISO8601.json
Created February 12, 2020 17:26
FULL 2020/02 - ISO 8601 Date and time format
{
"Australia/Adelaide": {
"country_name": "Australia",
"country_codes": "AU",
"latitude": -34.91667,
"longitude": 138.58333,
"zone_name": "Australia/Adelaide",
"abbreviation": "CAST",
"offset": 34200,