Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
for rate in $(seq $1 $2)
do
# attack and get mean response time
latency=$(jq -ncM '{method: "GET", url: "https://my-service.app/api/v1/endpoint"}' | \
vegeta attack -format=json -rate=$rate/s -duration=10s | \
vegeta report --type=json | \
jq .latencies.mean)
echo "$rate,$latency" >> results.csv
import csv
from matplotlib import style
import matplotlib.pyplot as plt
import matplotlib.animation as animation
limits = {
"x": (1, 50),
"y": (100, 1000),
}
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF7EU7YBEAC98XjkyGCQxg+ekUdhuO7kHlLjji7vjtApqt0ob56qHo2mntkQ
67qFDppkIs1DXk4uePjDqvWD2qn2QeXAu1Lf0rE7VHstnBtr3/mEKAIhaPTPybFq
d7EHBqbdtRIy0OzZSMzCXbFCWsDY4y71xSXzCNJDEVV7+IinJlIgEM8V8zBYxkuW
eb8Yhg7NmS4obVSqvjp8U8myo+c64egrw/Z7+NS6ooTsVCstsjaG16KgcnXbXKj8
0I9hAbv+btP7jooUHfO6vxdRwdleS3UOv9/w7bNvIKkehb1Tdb1x//6yM/von0IU
bp4nGYQnDtVpTINtVlERvlOakhHNet49+EJ/UmIGGfcuvA1VX+vsfdPSQEDa9+IX
kD+7Wq3pI9vmgP17KMnV7aporcu3RxVf68avwfKlFHoUgHl/ayQAPufNEA8isLyh
hGNmZQZFJpr83FFdmKmWC2lLIuoPrrq7hsUXgrHyZK983xSLdwtsh0U+qpBIoGNV

Keybase proof

I hereby claim:

  • I am martinzugnoni on github.
  • I am martinzugnoni (https://keybase.io/martinzugnoni) on keybase.
  • I have a public key whose fingerprint is 8C0F 52CD 2FAD B7B1 7160 DCF6 A958 8C22 8DC6 65EC

To claim this, I am signing this object:

@martinzugnoni
martinzugnoni / helm-cheatsheet.md
Created January 17, 2020 17:40 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
// Usar un semaforo para que sincronice la impresion a traves de 2 hilos distintos
// de ejecucion, la impresion por pantalla debe quedar en ete orden
// Primero Aprendo lenguaje C - Segundo tratare de aprender semaforos
// Probar primero comentando el semaforo, tuve que cambiar el orden de la ejecucion
// de los hilos, sino muy rara vez imprimia al reves.
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>
@martinzugnoni
martinzugnoni / replies.py
Created March 16, 2019 15:23 — forked from edsu/replies.py
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
"""
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So
#!/bin/bash
mayor_dir=0
mayor_dir_nombre=""
mayor_arch=0
mayor_arch_nombre=""
rutas_inv=0
@martinzugnoni
martinzugnoni / rmotr-wdd-recorded-class.md
Last active November 29, 2016 21:26
rmotr.com | Web Development with Django | Recordings of real classes

Recording of rmotr.com real classes

Those are examples of a real rmotr.com class. You will be attending to a weekly videoconference simulating a real classroom, with real teacher and classmates, but completely remote. You can speak up at anytime and ask questions to the instructor while she/he is explaining certain topic.

Classes cover the theoretical part of the course, but they are NOT 100% passive. There are dedicated parts of the class for you to live code or pair-program with classmates while the instructor reviews your code. Anyway, the strong practical part takes place in the 3 weekly coding sessions dedicated to resolve practical projects. (see sample projects section)

@martinzugnoni
martinzugnoni / rmotr-pyp-recorded-classes.md
Last active July 5, 2021 18:04
rmotr.com | Advanced Python Programming | Recordings of real classes

Recording of rmotr.com real classes

Those are examples of a real rmotr.com class. You will be attending to a weekly videoconference simulating a real classroom, with real teacher and classmates, but completely remote. You can speak up at anytime and ask questions to the instructor while she/he is explaining certain topic.

Classes cover the theoretical part of the course, but they are NOT 100% passive. There are dedicated parts of the class for you to live code or pair-program with classmates while the instructor reviews your code. Anyway, the strong practical part takes place in the 3 weekly coding sessions dedicated to resolve practical projects. (see sample projects section)