Skip to content

Instantly share code, notes, and snippets.

View qpfiffer's full-sized avatar
🔚

Quinlan Pfiffer qpfiffer

🔚
View GitHub Profile
@qpfiffer
qpfiffer / gist:9401983
Created March 6, 2014 23:33
Overwrite somewhere.
DEBUG src/port_driver.c:135: Command from server: 2
DEBUG src/port_driver.c:108: Key: :1:django.contrib.sessions.cachej2hpi8i40qgq92br48wqjxkpkuv39ys5�
DEBUG src/port_driver.c:113: Content type: application/octet-stream
DEBUG src/port_driver.c:135: Command from server: 2
DEBUG src/port_driver.c:108: Key: :1:django.contrib.sessions.cachej2hpi8i40qgq92br48wqjxkpkuv39ys5�
DEBUG src/port_driver.c:113: Content type: application/octet-stream
DEBUG src/port_driver.c:135: Command from server: 2
DEBUG src/port_driver.c:108: Key: :1:django.contrib.sessions.cachevqx0ms4awgsybueodse3uzouqhbcgg2kin/ol_util.beam
DEBUG src/port_driver.c:113: Content type: application/octet-stream
DEBUG src/port_driver.c:135: Command from server: 2
DEBUG src/oleg.c:201: New key: :1:django.contrib.sessions.cache1 Klen: 33
DEBUG src/port_driver.c:144: Command from server: 2
DEBUG src/port_driver.c:115: Key: :1:django.contrib.sessions.cacheabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz
Adrastea
Aitne
Amalthea
Ananke
Aoede
Arche
Autonoe
Callirrhoe
Callisto
Carme
From 791ae0840290992d296093676a34c5755b2ba077 Mon Sep 17 00:00:00 2001
From: Quinlan Pfiffer <qpfiffer@gmail.com>
Date: Thu, 20 Mar 2014 17:12:17 -0700
Subject: [PATCH] get_expiration should work now.
---
streamulus/database.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/streamulus/database.py b/streamulus/database.py
(gdb) print *original_bucket->next->next
$9 = {expiration = 0x4141414141414141, key = 'A' <repeats 250 times>,
klen = 4702111234474983745,
content_type = 0x4141414141414141 <error: Cannot access memory at address 0x4141414141414141>, ctype_size = 4702111234474983745,
data_ptr = 0x4141414141414141 <error: Cannot access memory at address 0x4141414141414141>, data_size = 4702111234474983745, hash = 1094795585,
next = 0x4141414141414141}
(gdb)
2014-04-09 12:31:09 Hamcha I'd do it myself but I haven't understood the API well
2014-04-09 12:31:22 Hamcha having "jars" and things like that didn't help
2014-04-09 12:31:40 @Wally Hamcha: Yeah I admit it's probably not the most accessible API
2014-04-09 12:31:40 Hamcha especially when the documentation goes "It's hard to piss in 51 jars" as an explaination of the concept of jar
@import "static/less/variables-mixins.less";
@import "static/less/fonts.less";
.packery {
.row {
margin-bottom: 12px;
.item {
margin-right: 12px;
&: first-child { margin-left: 13px; }
.item-content{ min-height: 392px; }
}
from django.contrib.messages.storage import default_storage
class MessagesSuck(object):
"""
Shoots django messages in the face.
"""
def process_request(self, request):
# Confuse django message, mezzanine and friends into
# assuming we still work:
# Tests performed on a stock FX-8350
# Data was put into each DB with `curl -X POST -d 'testdata' <url>`
# golegd frontend:
λ:~/src/wrk ./wrk -t8 -c400 -d30s http://localhost:8081/test/test
Running 30s test @ http://localhost:8081/test/test
8 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 8.83ms 4.87ms 221.73ms 94.33%
Req/Sec 6.01k 1.16k 17.20k 79.29%
1373370 requests in 30.00s, 172.89MB read
# From the oleg source directory:
export LD_LIBRARY_PATH=./build/lib:$LD_LIBRARY_PATH
valgrind --leak-check=full ./build/bin/oleg_test