Letter: A
Code points: U+0041
UTF-8 bytes: 41
UTF-16BE bytes: 00 41
Pound sign: £
Code points: U+00A3
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 bash | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
url=https://api.nextdns.io/profiles/$PROFILE_ID/denylist | |
curl -s -H "X-Api-Key: $API_KEY" $url | jq -r '.data[] | select(.active == true) | .id' | while read -r domain; do | |
echo "Deleting $domain..." | |
curl -X DELETE -H "X-Api-Key: $API_KEY" $url/$domain |
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 bash | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
url=https://api.nextdns.io/profiles/$PROFILE_ID/denylist | |
curl -s -H "X-Api-Key: $API_KEY" $url | jq -r '.data[] | select(.active == true) | .id' |
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 bash | |
API_KEY=xxx # Get it from https://my.nextdns.io/account | |
PROFILE_ID=xxxxxx # Get it from https://my.nextdns.io | |
url=https://api.nextdns.io/profiles/$PROFILE_ID/denylist | |
tac denylist.txt | while read -r domain; do | |
echo "Adding $domain..." | |
curl -d $"{\"id\": \"$domain\"}" \ |
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 | |
// 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 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 | |
/* | |
* 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 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 | |
// 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 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 | |
// 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 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
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) |
NewerOlder