Skip to content

Instantly share code, notes, and snippets.

View itaysk's full-sized avatar

Itay Shakury itaysk

View GitHub Profile
@itaysk
itaysk / licenses.jq
Last active January 3, 2024 13:09
License report from Trivy full license scan
[.Results[] | .Licenses//empty | .[]] |
group_by(.Name) | .[] |
{"license":.[1].Name, "findings":map(if .PkgName=="" then .FilePath else .PkgName end)}
@itaysk
itaysk / tracee-falcosidekick.yaml
Created October 8, 2021 16:23
Tracee with Falcosidekick in Kubernetes
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name: tracee
app.kubernetes.io/component: tracee
app.kubernetes.io/part-of: tracee
name: tracee
spec:
selector:
@itaysk
itaysk / aqua-cla.txt
Created September 9, 2021 10:42
Aqua Security Contributor License Agreement
Individual Contributor License Agreement
In order to clarify the intellectual property license granted with Contributions from any person or entity, Aqua 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 is for your protection as a Contributor as well as the protection of Aqua and its users; it 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 Aqua Security Software Ltd. (“Aqua”). In return, Aqua shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its nonprofit status and bylaws in effect at the time of the Contribution.
Except for the license granted herein to Aqua and recipients of software distributed by Aqua, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions. "Yo
@itaysk
itaysk / csv2vcf.awk
Created April 13, 2021 14:45
Outlook CSV to VCF
#! /usr/bin/env gawk -f
# convert contacts exported from Outlook.com to VCF (vCard)
BEGIN { FS = "," }
{
print ""
print "BEGIN:VCARD"
print "VERSION:3.0"
print "KIND:individual"
@itaysk
itaysk / jsonbench_test.go
Created July 18, 2020 10:08
golang json bench
// benchmark various json parsing and querying libraries on the use case of finding the image of the first container of a Kubernetes Pod
package jsonbench
import (
"encoding/json"
"io/ioutil"
"testing"
"github.com/Jeffail/gabs/v2"
"github.com/itchyny/gojq"
@itaysk
itaysk / python-build.20200602081612.15621.log
Created June 2, 2020 08:36
asdf python install 3.8.3 fail log
This file has been truncated, but you can view the full file.
/tmp/python-build.20200602081612.15621 ~/.asdf/plugins/python/pyenv
/tmp/python-build.20200602081612.15621/Python-3.8.3 /tmp/python-build.20200602081612.15621 ~/.asdf/plugins/python/pyenv
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.8... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... gcc
@itaysk
itaysk / Makefile
Created April 29, 2020 10:19
Embed file in Go using ELF section
build:
go build -o _main
objcopy --add-section myfile=myfile _main main
@itaysk
itaysk / Makefile
Last active April 30, 2020 15:32
Embed file in Go using go link flag
b64contents = $(shell base64 -w 0 myfile)
build:
go build -ldflags "-X main.myfile=$(b64contents)"
@itaysk
itaysk / Makefile
Last active April 29, 2020 09:44
Embed file in Go using one line go generate
build:
go generate
go build
@itaysk
itaysk / azure-search-export.sh
Created June 23, 2019 16:06
Azure Search Export
#! /bin/bash
# This script will export the json contents of an Azure Search instance into a JSON array.
# The script creates local files under the directory it is executed. The result is saved to a newly created local file.
# The script depends on `curl` and `jq` utilities.
# Arguments: $1 : azure search service name, $2: azure search index name, $3: azure search admin auth key.
set -e -o pipefail
serviceName="$1"