Skip to content

Instantly share code, notes, and snippets.

Kim Davies kjd

Block or report user

Report or block kjd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kjd /
Last active Jun 11, 2018
Which TLDs are not in the Public Suffix List?
#!/usr/bin/env python3
import requests, idna
current_suffixes = [x for x in requests.get(PUBLIC_SUFFIX_URL).text.split('\n') if x and not x.startswith('//')]
current_tlds = [idna.decode(x) for x in requests.get(DELEGATED_TLDS_URL).text.split('\n') if x and not x.startswith('#')]
kjd /
Created Jun 16, 2017
ccTLD to flags with Emoji
def cctld_to_flag(domain):
for letter in domain:
print(chr(ord(letter)+127365), end='')
View gist:0b94d8cc3c36a4dd54cd
### Keybase proof
I hereby claim:
* I am kjd on github.
* I am kjd ( on keybase.
* I have a public key whose fingerprint is E6D9 BAAD 8BE6 9E14 F383 7E49 D9B1 54C1 4A6C 23DC
To claim this, I am signing this object:
View gist:137507
#!/usr/bin/env python
# Base 58 function used by Flickr e.g. photo id 2360374815 becomes
def base58(i):
chars = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
o = ''
while (1):
You can’t perform that action at this time.