Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kbence's full-sized avatar

Bence Kiglics kbence

View GitHub Profile
@kbence
kbence / fixperm.sh
Created February 3, 2014 16:11
Script to give all permission to others exactly group has (750 -> 755) in the current directory (including the directory itself)
#!/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
@kbence
kbence / keybase.md
Created April 13, 2017 10:15
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 / vehicle.csv
Last active August 24, 2019 06:32
GreenGo vehicles
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
@kbence
kbence / dns-compare.sh
Created February 8, 2020 08:01
Script to check number of dig DNS results for a few free DNS servers out there.
#!/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 / har2vegeta.jq
Created May 27, 2021 14:35
Jq script to convert HAR files to vegeta requests (GET only)
#!/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 / aws-iam-actions-scraper.go
Created February 22, 2023 16:24
Script to scrape IAM Actions per service directly from the documentation
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/url"
"os"
"path"