wile e coyote
■───────────■
load tester
monolithic client or
individual containers +
rabbitmq container
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
def bitFlip(key): | |
flippedKeys = [] | |
for i in range(0, len(key), 2): | |
bits = bin(int(key[i:i+2], base=16)) | |
for j, b in enumerate(bits[2:len(bits)]): | |
flip = list(copy.deepcopy(bits[2:len(bits)])) | |
flip[j] = (1)^int(b) | |
#if j < len(flip)-1: | |
# flip[j+1] = (1)^int(b) | |
bitStr = "" |
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
""" | |
Python 3.4 HTML5 entity unescaping for all! Based on https://hg.python.org/cpython/file/500d3d6f22ff/Lib/html/__init__.py | |
""" | |
import sys | |
import re as _re | |
__all__ = ['unescape'] | |
_html5 = { |
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
#!/usr/bin/python3 | |
import dns.resolver | |
import random, time | |
dns.resolver.nameservers = ['localhost'] | |
letters= [chr(ord('a')+i) for i in range(26)] | |
types = ['NS', 'A', 'AAAA', 'MX'] | |
qps = 1 | |
while True: |
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
extern crate libc; | |
use std::io::{File, Open, ReadWrite, TempDir, Command, SeekSet}; | |
use std::io::process::{InheritFd}; | |
use std::os; | |
pub use self::libc::{ | |
STDIN_FILENO, | |
STDOUT_FILENO, | |
STDERR_FILENO | |
}; |
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
#!/usr/bin/python3 | |
# am i connected to a vpn? (using nmcli) | |
import subprocess | |
vpnd = bool() | |
for l in subprocess.Popen(["nmcli", "-t", "--fields", "name,vpn", "c", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].decode("utf-8").split("\n"): | |
if len(l) > 0: | |
a, b = l.split(":") | |
if b == "yes": | |
print('[92m'+a+'[0m', end="", flush=True) | |
vpnd = True |
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
<script> | |
$.get("https://api.github.com/users/rolandshoemaker/events?per_page=5", function(data) { | |
var output = []; | |
for (var event in data) { | |
if (data[event].type == "PushEvent") { | |
var dt = new Date(Date.parse(data[event].created_at)); | |
var ds = dt.getDate()+"/"+(dt.getMonth()+1)+"/"+dt.getFullYear()+" "+(dt.getUTCHours()+1)+":"+dt.getUTCMinutes()+" UTC"; | |
output.push(["<a href=\"https://github.com/"+data[event].repo.name+"\">"+data[event].repo.name+"</a>", data[event].payload.commits[data[event].payload.size-1].message, ds]); | |
} | |
} |
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
// ghost auto magnific popup galleryizer | |
// roland bracewell shoemaker - 2015 | |
$("article.post").each(function() { | |
// wrap all <img>s in <article class="post"> with <a>s pointing at the <img> src | |
var links = $($(this).find("img")).each(function() { | |
var new_link = $("<a>", {href: $(this).attr("src"), title: $(this).attr("alt")}); | |
$(this).wrap(new_link); | |
}); | |
// initialize magnificPopup() on all new links |
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
deliveryTimings := make(map[string]time.Time) | |
// Run forever. | |
for d := range deliveries { | |
if d.ReplyTo != "" { | |
deliveryTimings[fmt.Sprintf("%s:%s", d.CorrelationId, d.ReplyTo)] = time.Now() | |
} else { | |
rpcSent := deliveryTimings[fmt.Sprintf("%s:%s", d.CorrelationId, d.RoutingKey)] | |
if rpcSent != nil { | |
respTime := time.Since(rpcSent) |
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 ( | |
"crypto/ecdsa" | |
"crypto/rsa" | |
"crypto/x509" | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"runtime" |
OlderNewer