I hereby claim:
- I am thehackerdev on github.
- I am thehackerdev (https://keybase.io/thehackerdev) on keybase.
- I have a public key ASDu1dsuBEHadlU4aEIOYyb5mI6ThFtCilJbxtaKLoEbjgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import SimpleHTTPServer | |
import SocketServer | |
# Redirect to Google.com | |
class Redirect(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
def do_GET(self): | |
print self.path | |
self.send_response(301) | |
new_path = '%s%s'%('https://google.com', self.path) | |
self.send_header('Location', new_path) |
import ( | |
"bytes" | |
"io/ioutil" | |
"net/http" | |
) | |
// Function readResponseBody is a helper function to read the content from a response's body, | |
// and refill the body with another io.ReadCloser, so that it can be read again. | |
func readResponseBody(resp *http.Response) (content []byte, err error) { | |
// Get the content |
# File name | |
DIR := bin | |
PREFIX := race-the-web | |
TAG := $(shell git describe --always --dirty --tags) | |
# Build command | |
CMD_BUILD := go build -o $(DIR)/$(PREFIX)_$(TAG)_ | |
# Environment variables for build | |
ENV_OSX64 := GOOS=darwin GOARCH=amd64 |
private void delegate MyDelegate(); // This is the delegate that will be invoked from the main thread if needed |