Skip to content

Instantly share code, notes, and snippets.

@kbence
kbence / har2vegeta.jq
Created May 27, 2021
Jq script to convert HAR files to vegeta requests (GET only)
View har2vegeta.jq
#!/usr/bin/env jq -r --from-file
.log.entries[].request
| select(.url | contains("example.com"))
| select(.method == "GET")
| .method + " " + .url + "\n" +
(
[
.headers[]
| select(.name | startswith(":") == false)
@kbence
kbence / dns-compare.sh
Created Feb 8, 2020
Script to check number of dig DNS results for a few free DNS servers out there.
View dns-compare.sh
#!/usr/bin/env bash
DNS_SERVERS="
8.8.8.8 8.8.4.4
1.1.1.1
208.67.222.222 208.67.220.220
199.85.126.10 199.85.127.10
8.26.56.26 8.20.247.20
9.9.9.9 149.112.112.112
64.6.64.6 64.6.65.6
@kbence
kbence / vehicle.csv
Last active Aug 24, 2019
GreenGo vehicles
View vehicle.csv
id remote_id service_id make model variant plate_number color doors seats
1 1017 1001 VW e-up! NNB362 SILVER 5 4
22 1024 1001 VW e-Up! NNB746 SILVER 5 4
24 1026 1001 VW e-Up! NNB827 SILVER 5 4
248 1032 1001 VW e-Up! NNB828 SILVER 5 4
21 1034 1001 VW e-Up! NNB737 SILVER 5 4
23 1043 1001 VW e-Up! NNB747 SILVER 5 4
26 1044 1001 VW e-Up! NNB834 SILVER 5 4
204 1045 1001 VW e-up! NNB366 SILVER 5 4
25 1046 1001 VW e-Up! NNB831 SILVER 5 4
View keybase.md

Keybase proof

I hereby claim:

  • I am kbence on github.
  • I am bnc (https://keybase.io/bnc) on keybase.
  • I have a public key ASBOQnrLtZrspAJ0d5oYIzRqRP3mxaB5GomG9bXIdMHt9wo

To claim this, I am signing this object:

@kbence
kbence / fixperm.sh
Created Feb 3, 2014
Script to give all permission to others exactly group has (750 -> 755) in the current directory (including the directory itself)
View fixperm.sh
#!/bin/bash
find $(pwd) | while read file; do
PERMS=$(stat --format %a $file)
NEW_PERMS=$(echo $PERMS | awk '{printf("%s%s", substr($0, 1, 2), substr($0, 2, 1))}')
if [ "$PERMS" != "$NEW_PERMS" ]; then
COMMAND="chmod $NEW_PERMS $file"
echo $COMMAND "# had $PERMS"
$COMMAND