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 urllib2 | |
| from multiprocessing.dummy import Pool as ThreadPool | |
| urls = [ | |
| 'http://www.python.org', | |
| 'http://www.python.org/about/', | |
| 'http://www.onlamp.com/pub/a/python/2003/04/17/metaclasses.html', | |
| 'http://www.python.org/doc/', | |
| 'http://www.python.org/download/', | |
| 'http://www.python.org/getit/', |
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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "math" | |
| "time" | |
| ) | |
| func Strappend(p string, a string) 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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "time" | |
| ) | |
| func Strappend(p string, a string) string { | |
| b := bytes.NewBufferString(p) |
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
| # Uncomment this for debugging output | |
| set -x | |
| GOOS=$(uname -s) | |
| GOARCH=$(uname -m) | |
| GOBASE=${HOME}/.goroot/${GOOS}/${GOARCH} | |
| GOVERS_BSTRAP=1.4.3 | |
| GOFILE_BSTRAP=${HOME}/.goroot/go${GOVERS_BSTRAP}.src.tar.gz | |
| GOURL_BSTRAP=https://storage.googleapis.com/golang/go${GOVERS_BSTRAP}.src.tar.gz | |
| GOVERS_ACTIVE=1.7.3 |
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 python2 | |
| import time | |
| import socket | |
| if __name__ == '__main__': | |
| st = int(time.time()) | |
| while 1: | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| sock.connect(('relay-vip.phl.corp.theplatform.com', 2003)) |
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
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "time" | |
| ) | |
| func main() { | |
| ts := time.Now().Unix() |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <time.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <netdb.h> |
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
| --- host.orig.go 2017-02-03 23:03:06.070727000 -0800 | |
| +++ host.go 2017-02-03 23:03:22.349835000 -0800 | |
| @@ -53,6 +53,19 @@ | |
| return strings.TrimRight(string(b), "\x00") | |
| } | |
| +// uint8ToString converts [65]uint8 in syscall.Utsname to string | |
| +func uint8ToString(bs [65]uint8) string { | |
| + b := make([]byte, len(bs)) | |
| + for i, v := range bs { |
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
| # Uncomment this for debugging output | |
| #set -x | |
| test ! -z "$(which clang 2>/dev/null)" && CC=clang || CC=gcc | |
| GOOS=$(uname -s) | |
| GOARCH=$(uname -m) | |
| GOBASE=${HOME}/.goroot/${GOOS}/${GOARCH} | |
| GOVERS_BSTRAP=1.4.3 | |
| GOFILE_BSTRAP=${HOME}/.goroot/go${GOVERS_BSTRAP}.src.tar.gz | |
| GOURL_BSTRAP=https://storage.googleapis.com/golang/go${GOVERS_BSTRAP}.src.tar.gz |
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 python2 | |
| import os | |
| import sys | |
| import time | |
| import random | |
| import socket | |
| import argparse | |
| parser = argparse.ArgumentParser() |