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
| //// First, Implement an interface to intercept the HTTP Request before it goes out. | |
| import java.io.IOException; | |
| import com.google.api.client.googleapis.services.AbstractGoogleClientRequest; | |
| import com.google.api.client.googleapis.services.GoogleClientRequestInitializer; | |
| public class TracingTokenInitializer implements GoogleClientRequestInitializer { | |
| @Override | |
| public void initialize(AbstractGoogleClientRequest<?> req) throws IOException { | |
| System.out.println("Attaching tracing token..."); | |
| req.put("trace", "token:<<TOKEN GOES HERE>>"); |
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
| function FindProxyForURL(url, host) { | |
| // Plain hostnames. ( e.g. http://server ) | |
| if (isPlainHostName(host)) { | |
| return "DIRECT"; | |
| } | |
| // Private address classes. | |
| if (isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") || | |
| isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") || |
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
| import sys | |
| import os | |
| def read_file(f, split="\n"): | |
| return open(f).read().split(split) | |
| list1 = read_file(sys.argv[1]) | |
| list2 = read_file(sys.argv[2]) |
NewerOlder