Letter: A
Code points: U+0041
UTF-8 bytes: 41
UTF-16BE bytes: 00 41
Pound sign: £
Code points: U+00A3
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 | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
curl -s -H "X-Api-Key: $API_KEY" https://api.nextdns.io/profiles/$PROFILE_ID/denylist | jq -r '.data[] | select(.active == true) | .id' |
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 | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
tac denylist.txt | while read -r domain; do echo $domain; curl -d $"{\"id\": \"$domain\"}" -H 'Content-Type: application/json' -H "X-Api-Key: $API_KEY" https://api.nextdns.io/profiles/$PROFILE_ID/denylist; sleep 1; done |
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 | |
// date | |
echo "date\n"; | |
echo date('Y-m-d H:i:s'), "\n"; | |
$dt = new DateTime(); | |
echo $dt->format('Y-m-d H:i:s'), "\n\n"; | |
// gmdate (UTC date) | |
echo "gmdate\n"; |
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 | |
/* | |
* Heart emoji: ❤️ | |
* UTF-8 bytes: E2 9D A4 EF B8 8F | |
* Code points: U+2764 U+FE0F | |
*/ | |
header('Content-Type: text/plain'); |
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 | |
// ISO-8859-1 → UTF-8 | |
function latin1ToUtf8(string $str): string | |
{ | |
return iconv('ISO-8859-1', 'UTF-8', $str); | |
} | |
// UTF-8 → ISO-8859-1 | |
function utf8ToLatin1(string $str): string |
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 | |
// For ASCII only | |
$hello = 'Hello'; | |
$revStrBytes1 = ''; | |
for ($i = strlen($hello) - 1; $i >= 0; $i--) { | |
$revStrBytes1 .= $hello[$i]; | |
} | |
// Alternative to the code above |
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
Gmail | |
IMAP: imap.gmail.com:993 (SSL/TLS) | |
POP: pop.gmail.com:995 (SSL/TLS) | |
SMTP: smtp.gmail.com:587 (STARTTLS) | |
Microsoft (Hotmail, Outlook) | |
IMAP: outlook.office365.com:993 (SSL/TLS) | |
POP: outlook.office365.com:995 (SSL/TLS) | |
SMTP: smtp-mail.outlook.com:587 (STARTTLS) |
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 | |
set -euo pipefail | |
echo 'Installing rclone...' | |
wget https://downloads.rclone.org/rclone-current-linux-amd64.zip | |
unzip rclone-current-linux-amd64.zip | |
sudo mv rclone-*-linux-amd64/rclone /usr/local/bin |
NewerOlder