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/python3 | |
import glob | |
import json | |
import sys | |
import os | |
from urllib.parse import urlparse | |
# download from https://github.com/pirate/sites-using-cloudflare/ | |
cloudflare_tlds = frozenset(map(lambda x:x.strip(), | |
open("sites-using-cloudflare-master/sorted_unique_cf.txt"))) |
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
/* Why do this ... */ | |
load: function(url) { | |
setTimeout(function () { doload(url) }, 1); | |
} | |
doload: function (url) { | |
/* synchronous XHR */ | |
xhr.open("GET", url, false); | |
xhr.send(null); |
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
import sys | |
from_string = sys.argv[1] | |
to_string = sys.argv[2] | |
with open("input.txt") as f: | |
text = f.read() | |
text = text.replace(from_string, to_string) |
OlderNewer