Skip to content

Instantly share code, notes, and snippets.

Working through a massive backlog of issues, PRs and emails. Send coffee.

Hassy Veldstra hassy

Working through a massive backlog of issues, PRs and emails. Send coffee.
View GitHub Profile

Artillery Contributor License Agreement

In order to clarify the intellectual property license granted with Contributions from any person or entity, Artillery Software Inc. ("Artillery") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license does not change your rights to use your own Contributions for any other purpose.

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Artillery.

Except for the license granted herein to Artillery and recipients of software distributed by Artillery, You reserve all right, title, and interest in and to Your Contributions.

hassy /
Last active Mar 21, 2020
Hammerspoon config

Hassy's Hammerspoon Config

Just like its website says Hammerspoon is staggeringly powerful (and also staggeringly fun). This is my Hammerspoon config. It's very simple, but it allowed me to replace two other apps: Spectacle for moving windows around, and Karabiner which I used for quickly switching between apps.

This is where it all began:

🎧 Have you ever had your bluetooth headphones disconnect and inadvertently & loudly share your unconventional music taste with the rest of the office/coffeeshop?

1. brew install hammerspoon
2. drop a few lines into ~/.hammerspoon/init.lua
3. never again! 🤫

— Hassy Veldstra (@hveldstra) March 11, 2020

Setting up


Keybase proof

I hereby claim:

  • I am hassy on github.
  • I am veldstra ( on keybase.
  • I have a public key ASA-ENS93q9-z-YpSNbYjE3jizrUDuaYY4rGqovAfdBPsQo

To claim this, I am signing this object:

# Local variables:
# mode: shell-script
# eval: (sh-set-shell "zsh")
# End:
alias k-system='kubectl -n kube-system'
source <(kubectl completion zsh)
function k-context() {
hassy / kms-vault
Last active Mar 22, 2022
Encrypt/decrypt files using AWS KMS
View kms-vault
#!/usr/bin/env bash
# License: MIT -
# Usage:
# Encrypt a file:
# kms-vault encrypt My-Key-Alias some-file-i-want-encrypted.txt > topsecret.asc
hassy / hang.js
Last active Dec 8, 2016
Trigger an infinite loop in Node.js 6.8.1+
View hang.js
var i1 = setImmediate(function() {
console.log('i1 cb');
var i2 = setImmediate(function() {
console.log('i2 cb');
hassy / processor.js
Created Nov 17, 2016
Custom Artillery functions to print the latency distribution for a single HTTP request
View processor.js
// Custom Artillery functions to print the latency distribution for a single HTTP request
// Example usage: (in your scenario)
// - get:
// url: "/some/endpoint"
// beforeRequest: ["recordStartTime"]
// afterResponse: ["logLatencyDelta"]
// name: "Optional name for the endpoint for the report"
hassy / searchItems.csv
Created Sep 27, 2016
Artillery CSV payloads
View searchItems.csv
item peanuts
item starburst
item eggs
item butter
item creamer
item pudding
item yogurt
item egg%20noodles
item alfredo

Tracing your own app

Set up lltrace-aws-sdk

Wait for enough activity to be traced

(a quick load-test is good if you're impatient)

Run lltrace


What can be traced

  • S3 putObject and uploadFile
  • Invoking other lambdas
  • Publishing to SNS topics
  • Custom actions (e.g. write to Neo4J)


By default only 10% of traced actions actually get logged.