This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* @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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace ArrayIterator\App\Util; | |
/** | |
* Class Normalizer | |
* @package ArrayIterator\App\Util | |
*/ | |
final class Normalizer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443 ssl http2; | |
server_name example.com; | |
root /path/to/public/www; | |
# ADD HEADERS | |
# Using nginx-http-mod-headers-more | |
# https://github.com/openresty/headers-more-nginx-module | |
more_set_headers 'X-Browser-Os: $client_browser_os'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"number": 1, | |
"name": "سورة الفاتحة", | |
"transliteration_en": "Al-Faatiha", | |
"translation_en": "The Opening", | |
"total_verses": 7, | |
"revelation_type": "Meccan", | |
"verse_start": 1 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// code code | |
/** | |
* Code Plugin change with get value | |
*/ | |
if (!function_exists('arrayiterator_hide_current_plugin')) { | |
function arrayiterator_hide_current_plugin() { | |
// remove HOOKS | |
remove_action('admin_init', __FUNCTION__); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function parse_nmea(string $geo_str) : array | |
{ | |
$geo_str = trim($geo_str); | |
$split = explode(",", $geo_str); | |
$split = array_map('trim', $split); | |
$lat = $split[3]; | |
$lat_2 = abs(substr($lat, 0, 2)); | |
$lat_3 = (abs(substr($lat, 2)) / 60); | |
$lon = $split[5]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this route for git push notification and pull request | |
$this->post('/git_pull', function (ServerRequestInterface $request, ResponseInterface $response) { | |
$body = $request->getParsedBody(); | |
$auth = $body['auth']??$request->getQueryParams()['auth']??null; | |
if ($auth !== null) { | |
$body['auth'] = $auth; | |
} | |
$payload = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64.233.160.0/19 1; | |
66.102.0.0/20 1; | |
66.249.64.0/20 1; | |
72.14.192.0/18 1; | |
74.125.0.0/16 1; | |
209.85.128.0/17 1; | |
216.239.32.0/19 1; | |
64.18.0.0/20 1; | |
108.177.8.0/21 1; |