Skip to content

Instantly share code, notes, and snippets.

@imiric
imiric / README.md
Last active August 8, 2023 13:42
Redis TLS test files

Redis TLS test

  1. Run sh gen-test-certs.sh to generate the TLS certificates.

  2. Tweak docker-compose.yml as needed (e.g. to disable TLS comment out the REDIS_TLS* env vars), and run docker-compose up.

@imiric
imiric / README.md
Last active June 23, 2023 14:48
k6 event system benchmarks

Benchmark results for grafana/k6#3112 comparing the run of a simple script on master (97d40e939) and feat/2432-events (d5897faac), with and without importing a JS module that uses events.

Commands ran:

$ go test -bench='^BenchmarkRun$' -run='^$' -benchtime=100x -count=10 -benchmem ./cmd/tests \
  | tee "bench_run_$(git rev-parse --short HEAD).txt"
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: /home/ivan/.local/tmp/test-http-server/ned-test-2879/test.js
output: -
@imiric
imiric / blank.js
Created June 3, 2022 15:08
xk6-browser memory usage tests
import { sleep } from 'k6';
import launcher from 'k6/x/browser';
export default function() {
const browser = launcher.launch('chromium', {
headless: true,
timeout: '600s',
slowMo: '500ms',
});
const context = browser.newContext();
@imiric
imiric / formdata.js
Last active January 14, 2021 10:04 — forked from Rob--W/html5-formdata-polyfilll.js
FormData polyfill for k6
/*
* FormData polyfill for k6
* (c) 2014 Rob Wu <rob@robwu.nl>
* License: MIT
*
* This simplifies the creation of multipart/form-data requests from k6 scripts.
* It was adapted from the original version by Rob Wu to remove references of
* XMLHttpRequest and File related code which isn't supported in k6.
**/
(function(exports) {
@imiric
imiric / lookup.go
Created August 10, 2020 14:37
DNS lookup test with sdns
package main
import (
"context"
"fmt"
"log"
"net"
"os"
"time"

Keybase proof

I hereby claim:

  • I am imiric on github.
  • I am imiric (https://keybase.io/imiric) on keybase.
  • I have a public key ASD11K4D060gWrXzD5Pcz3FdTmJL1ebtVfsOmIlEUtOK8go

To claim this, I am signing this object:

@imiric
imiric / xclip
Created August 31, 2017 18:59
xclip for Cygwin/MSYS2
#!/bin/bash
# This replicates xclip functionality used by pass in Cygwin/MSYS2
# Original author: https://tylor.io/2015/07/13/password-manager/
while [[ $# > 0 ]]
do
key="$1"
case $key in
-o|-out)
@imiric
imiric / pass.zsh
Last active November 30, 2019 13:43 — forked from vvicaretti/pass.zsh
pass.zsh
# -*- sh -*-
#
# Original plugin: https://gist.github.com/vvicaretti/cb4b2e27dadaf458eb3bc4ac215cf5fd
# Changes:
# - Made lookup case-insensitive
#
# [Pass](https://www.passwordstore.org/)
# the standard unix password manager
# [zaw](https://github.com/zsh-users/zaw)
# zsh anything.el-like widget
Verifying that "imiric.id" is my Blockstack ID. https://onename.com/imiric