Skip to content

Instantly share code, notes, and snippets.

@timint
timint / api.php
Last active May 12, 2020
Simple concept for a LiteCart REST API
View api.php
<?php
ob_start();
include('includes/app_header.inc.php');
try {
$json = [];
@timint
timint / cloudflare_real_ip.php
Last active Apr 24, 2020
Cloudflare - Set real IP
View cloudflare_real_ip.php
<?php
// Cloudflare - Set Real IP
$cloudflare_ip_ranges = array(
'204.93.240.0/24', '204.93.177.0/24', '199.27.128.0/21',
'173.245.48.0/20', '103.21.244.0/22', '103.22.200.0/22',
'103.31.4.0/22', '141.101.64.0/18', '108.162.192.0/18',
'190.93.240.0/20', '188.114.96.0/20', '197.234.240.0/22',
'198.41.128.0/17', '162.158.0.0/15',
);
@timint
timint / telenor-ddns.txt
Created Feb 26, 2020
List of all DDNS providers supported on Telenor routers (Technicolor TG799vac Xtream)
View telenor-ddns.txt
3322.org
able.or.kr
afraid.org-basicauth
afraid.org-keyauth
afraid.org-v2-basic
afraid.org-v2-token
all-inkl.com
changeip.com
core-networks.de
ddns.com.br
@timint
timint / scan.php
Last active Nov 30, 2018
A script to find all PHP files with leading or trailing whitespace
View scan.php
<?php
header('Content-Type: text/plain');
$dir_iterator = new RecursiveDirectoryIterator("./");
$iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::SELF_FIRST);
$count=0;
foreach ($iterator as $file) {
$count++;
@timint
timint / fontawesome4to5.js
Last active Nov 23, 2020
Migrate Fontawesome 4 to 5 using jQuery (For the CSS Webfont version)
View fontawesome4to5.js
/*
* Migrate Fontawesome 4 to Fontawesome 5
* @website https://www.litecart.net/
*/
(function(){
var icons = {
"fa-500px": "fab fa-500px",
"fa-address-book-o": "far fa-address-book",
"fa-address-card-o": "far fa-address-card",