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
func DoRequest(req *http.Request, c net.Conn) (*http.Response, error) { | |
defer req.Body.Close() | |
dumped, err := httputil.DumpRequestOut(req, false) | |
if err != nil { | |
return nil, err | |
} | |
if _, err = c.Write(dumped); err != nil { | |
return nil, err | |
} | |
reader := bufio.NewReader(c) |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" | |
"net/http/httptest" |
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
Michaels-MacBook-Pro:~ redbo$ ssh whoami.filippo.io | |
The authenticity of host 'whoami.filippo.io (178.32.139.168)' can't be established. | |
RSA key fingerprint is c8:9a:b0:9d:59:96:24:37:70:4c:ef:eb:31:47:68:40. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Warning: Permanently added 'whoami.filippo.io,178.32.139.168' (RSA) to the list of known hosts. | |
+---------------------------------------------------------------------+ | |
| | | |
| _o/ Hello Michael Barton! | |
| | |
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 ctypes | |
import os | |
import mmap | |
class Record(ctypes.Structure): | |
_fields_ = [('index', ctypes.c_uint64), | |
('key_length', ctypes.c_uint16), | |
('key', ctypes.c_char * 256)] |
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
On Wed, Nov 30, 2011 at 4:07 AM, Soren Hansen <soren@linux2go.dk> wrote: | |
> To me, the PPA's have always been a QA tool. I wanted people willing to | |
> help test OpenStack to be able to do so with as little effort as | |
> possible. Building packages per-commit gave us that. | |
... | |
> This is completely different from a "production" PPA. I wouldn't dream | |
> of pointing people to the above mentioned PPA for their production | |
> environment. If someone wants to offer this outside of (but perhaps in | |
> cooperation with) OpenStack, that'd be great. I'd be delighted to see | |
> companies taking this on and offering a supported OpenStack |
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 mmap | |
import ctypes | |
class Record(ctypes.Structure): | |
_fields_ = [('index', ctypes.c_uint64), | |
('key', ctypes.c_char * 256)] | |
RECORD_COUNT = 256 |
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
#include <stdio.h> | |
struct args { | |
int someval; | |
int someval2; | |
char *someval3; | |
}; | |
void _print_some_stuff(struct args a) | |
{ |
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
gholt Mar 14 | |
Patch Set 1: I would prefer that you didn't submit this | |
swift/common/middleware/proxy_logging.py:152:9: E301 expected 1 blank line, found 0 | |
This is called proxy_logging in some places, access-logging in others. With where it is | |
suggested in the pipeline, it seems like access-logging would be the proper name. | |
However, with this change some requests will be double-logged due to folks writing |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"io" | |
"encoding/binary" | |
"encoding/json" | |
"compress/gzip" | |
) |
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
@app.route('/<path:path>', methods=['OPTIONS']) | |
def allow_cors(path): | |
resp = current_app.make_default_options_response() | |
resp.headers['Access-Control-Allow-Origin'] = request.headers.get('Origin') | |
resp.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT' | |
resp.headers['Access-Control-Max-Age'] = '21600' | |
resp.headers['Access-Control-Allow-Credentials'] = 'true' | |
return resp |