Skip to content

Instantly share code, notes, and snippets.

View amckinley's full-sized avatar

Austin McKinley amckinley

View GitHub Profile
(50380) accepted ('127.0.0.1', 50052)
INFO:socketio:kombu backend initialized.
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Sending packet OPEN data {'pingInterval': 25000, 'pingTimeout': 60000, 'upgrades': ['websocket'], 'sid': '673f58e7b27345f29ca6013bcbbd09ac'}
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Sending packet MESSAGE data 0
127.0.0.1 - - [01/Sep/2016 12:02:46] "GET /socket.io/?EIO=3&transport=polling&t=1472756566581-0 HTTP/1.1" 200 381 0.009200
(50380) accepted ('127.0.0.1', 50054)
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Received request to upgrade to websocket
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Sending packet NOOP data None
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Upgrade to websocket successful
INFO:engineio:673f58e7b27345f29ca6013bcbbd09ac: Received packet PING data None
event names:
c->s:
host_game
join_game
hand_choices
s->c:
game_hosted
player_connected
round_start
player_ready
public String toString() {
String result = "";
for (int i = 0; i < this.numBuckets; i++) {
LinkedList<Map.Entry<K, V>>> current = this.internalList.get(i);
String bucketStatus;
if (current == null) {
bucketStatus = "bucket " + i + " is empty";
} else {
bucketStatus = "bucket " + i + " has " + current.size() + " items";
// new style syntax
for (Map.Entry<K, V> current : this.internalList.get(index)) {
System.out.println(current);
}
// old school syntax
LinkedList<Map.Entry<K, V>> myList = this.internalList.get(index);
for (int i = 0; i < myList.size(); i++) {
Map.Entry<K, V> current = myList.get(i);
System.out.println(current);
def hex_to_bytearray(hex_str):
array_len = ??? # how many bytes do you need for a hex string of length n?
b_arr = bytearray(array_len)
hex_to_decimal = {
"00": 0,
"01": 1,
# etc. dont write this out; find a way to print out this table and then copy/paste it here
}
for idx, char_pair in enumerate(???): # how can you split the hex string into 2-character chunks?
>>> foo = bytearray(5)
>>> foo[0] = 100
>>> foo[0] = 500
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: byte must be in range(0, 256)
>>> foo[0]
100
>>> chr(foo[0])
'd'
ubuntu@ip-10-150-95-71:~/deploy$ dig housewinsor.com @ns-1714.awsdns-22.co.uk
; <<>> DiG 9.9.5-3-Ubuntu <<>> housewinsor.com @ns-1714.awsdns-22.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52384
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
def cool_method(a):
a.append(42)
def main():
a = [1,2,3]
cool_method(a)
print a
if __name__ == '__main__':
main()
FAILURE 1439925502.912394 1540 [AsyncMcClient] [other] [mcrouter] network/AsyncMcClientImpl.cpp:570] Error: "Error parsing message 'VALUE account_rep_change_23424742 0 22\r\n0\000\007q\021\005reset\nU\323\222\?\r\n\000\000\000\000\000\000END\r\nVALUE Model_Account_22479213 0 28\r\nModel_Account_22479213_20031\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\nEND\r\n' at character 62!", client state: UP, remote endpoint: imgur-cache.tumysy.0002.use1.cache.amazonaws.com:11211:TCP:ascii, number of requests sent through this client: 10636, McClientRequestContextQueue info: Currently have 0 timedout initializers, 0 requests in replied queue, 10 requests in pending reply queue, 0 requests in write queue and 8 requests in pending queue, the first alive request is: OperationT is N8facebook8memcache11McOperationILi5EEE, RequestT is N8facebook8memcache9McRequestE, serialized data was: "get account_rep_change_23424742\r\n"
"libmcrouter.mcrouter.11211": {"async_spool":"/var/spool/mcrouter","asynclog_disable":"0"
{
"pools" : {
"sessions-pool" : {
"servers" : [
<snip>
]
},
"wildcard-pool": {
"servers" : [