Skip to content

Instantly share code, notes, and snippets.

View hassy's full-sized avatar
🐢
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
@hassy
hassy / blitz.yml
Created July 15, 2022 10:51
Artillery script - AWS Lambda blog post
config:
target: http://asciiart.artillery.io:8080
phases:
- duration: 60
arrivalRate: 5
rampTo: 10
- duration: 120
arrivalRate: 10
rampTo: 20
- duration: 120
@hassy
hassy / artillery_cla.md
Created August 26, 2021 09:43
Artillery CLA

Artillery Contributor License Agreement

https://artillery.io

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
hassy / README.md
Last active May 12, 2023 13:46
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! 🤫 pic.twitter.com/RsHJn17djR

— Hassy Veldstra (@hveldstra) March 11, 2020

Setting up

Keybase proof

I hereby claim:

  • I am hassy on github.
  • I am veldstra (https://keybase.io/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
hassy / kms-vault
Last active December 29, 2023 04:11
Encrypt/decrypt files using AWS KMS
#!/usr/bin/env bash
# License: MIT - https://opensource.org/licenses/MIT
#
# Usage:
#
# Encrypt a file:
# kms-vault encrypt My-Key-Alias some-file-i-want-encrypted.txt > topsecret.asc
#
@hassy
hassy / hang.js
Last active December 8, 2016 13:11
Trigger an infinite loop in Node.js 6.8.1+
var i1 = setImmediate(function() {
console.log('i1 cb');
clearImmediate(i2);
clearImmediate(i3);
});
var i2 = setImmediate(function() {
console.log('i2 cb');
});
@hassy
hassy / processor.js
Created November 17, 2016 21:59
Custom Artillery functions to print the latency distribution for a single HTTP request
//
// 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
hassy / searchItems.csv
Created September 27, 2016 10:14
Artillery CSV payloads
item peanuts
item starburst
item eggs
item butter
item creamer
item pudding
item yogurt
item egg%20noodles
item alfredo
@hassy
hassy / soda-social-6.md
Last active February 1, 2018 11:14
soda social 6

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