Skip to content

Instantly share code, notes, and snippets.

View ArrayIterator's full-sized avatar

ArrayIterator ArrayIterator

View GitHub Profile
@ArrayIterator
ArrayIterator / as-numbers.php
Last active October 31, 2023 20:54
array list of tld domain + supported sub domains, ipv4, ipv6, as-number include whois server
<?php
declare(strict_types=1);
// auto generated at : 2023-10-28T05:03:52+07:00
return [
'0-0' => [
'range' => [
0,
0,
],
@ArrayIterator
ArrayIterator / CreditCard.php
Last active December 28, 2022 18:20
PHP Credit Card Generator / Validator
<?php
declare(strict_types=1);
namespace ArrayIterator\Generator;
/**
* Credit card validator & generator
*/
class CreditCard
{
@ArrayIterator
ArrayIterator / ubuntu (16|18).04 - network interface (ifup down)
Last active November 4, 2022 13:45
assign / implement ip6 OVH Ubuntu
# /etc/network/interfaces.d/50-cloud-init.cfg
# command : ifup -a
# 2001:4860:4860::8888 2001:4860:4860::8844 is a google dns
iface ens3 inet6 static
address ipv_6
netmask 64
gateway ipv_6_gateway
dns-nameservers 2001:4860:4860::8888 2001:4860:4860::8844
@ArrayIterator
ArrayIterator / Events.php
Last active February 24, 2022 03:38
Simple Event Dispatcher (Just Like Simple WordPress Hooks - Without Accepted Args)
<?php
declare(strict_types=1);
namespace ArrayIterator\SimpleEvent;
use Countable;
use RuntimeException;
/**
* Class Events
@ArrayIterator
ArrayIterator / Lzw.js
Last active July 14, 2020 04:04
LZW (Lempel–Ziv–Welch) Data Compression - JS & PHP
/*!
* @link https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch
* @license MIT
*/
(function(win) {
function convert_compat_string(e) {
if (e === undefined || e === null || typeof e === 'boolean') {
e = e ? '1' : '';
}
return String(e);
@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/}
@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,
@ArrayIterator
ArrayIterator / ISO4217.json
Last active December 10, 2022 08:34
FULL 2020/02 - ISO 4217 Currency codes
{
"BDT": {
"code": "BDT",
"name": "Bangladeshi Taka",
"symbol": "\u09f3"
},
"EUR": {
"code": "EUR",
"name": "Euro",
"symbol": "\u20ac"
@ArrayIterator
ArrayIterator / DesktopUserAgent.php
Last active February 12, 2020 17:54
PHP Response Generator , Simple Token Generator & User-Agent Helper
<?php
declare(strict_types=1);
namespace ArrayIterator\Library\Source\Generator;
use InvalidArgumentException;
use RangeException;
use TypeError;
/**