This file contains 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 bash | |
cd /usr/share/GeoIP; | |
curl -LRO https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz; | |
curl -LRO https://download.db-ip.com/free/dbip-city-lite-$(date +%Y-%m).mmdb.gz; | |
curl -LRO https://download.db-ip.com/free/dbip-asn-lite-$(date +%Y-%m).mmdb.gz; | |
gunzip dbip-$(date +%Y-%m).mmdb.gz; | |
ln -sf dbip-country-lite-$(date +%Y-%m).mmdb dbip-country-lite.mmdb; | |
ln -sf dbip-city-lite-$(date +%Y-%m).mmdb dbip-city-lite.mmdb; | |
ln -sf dbip-asn-lite-$(date +%Y-%m).mmdb dbip-asn-lite.mmdb; | |
geoipupdate -v; |
This file contains 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
# https://help.duckduckgo.com/duckduckgo-help-pages/results/duckduckbot/ | |
20.191.45.212 | |
23.21.227.69 | |
40.88.21.235 | |
50.16.241.113 | |
50.16.241.114 | |
50.16.241.117 | |
50.16.247.234 | |
52.5.190.19 |
This file contains 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 | |
class File_Streamer | |
{ | |
private $_fileName; | |
private $_contentLength; | |
private $_destination; | |
public function __construct() | |
{ | |
if (!isset($_SERVER['HTTP_X_FILE_NAME']) |
This file contains 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
function getY(max, height, diff, value) { | |
return parseFloat((height - (value * height / max) + diff).toFixed(2)); | |
} | |
function removeChildren(svg) { | |
[...svg.querySelectorAll("*")].forEach(element => svg.removeChild(element)); | |
} | |
function defaultFetch(entry) { | |
return entry.value; |
This file contains 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
CREATE OR REPLACE FUNCTION inet_aton(ip) AS ( | |
cast( | |
split_part(ip, '.', 1)::UINTEGER * 16777216 + | |
split_part(ip, '.', 2)::UTINYINT * 65536 + | |
split_part(ip, '.', 3)::UTINYINT * 256 + | |
split_part(ip, '.', 4)::UTINYINT as UINTEGER) | |
); | |
-- select inet_aton('255.255.255.252'); |
This file contains 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 | |
$data = "lazy dog"; | |
foreach (hash_algos() as $v) { | |
$r = hash($v, $data, false); | |
printf("%-12s %3d %s\n", $v, strlen($r), $r); | |
} | |
/* |
OlderNewer