Skip to content

Instantly share code, notes, and snippets.


Itay Shakury itaysk

View GitHub Profile
#! /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
View jsonbench_test.go
// 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 (
itaysk / python-build.20200602081612.15621.log
Created Jun 2, 2020
asdf python install 3.8.3 fail log
View python-build.20200602081612.15621.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"
itaysk / prepull.yaml
Last active Jun 2, 2020
Kubernetes: Pre-pull images into node (moved to: )
View prepull.yaml
# There's a newer version available here:
# All future updates will be made there.
# Please also post you questions as issues on that repo instead of commenting here
apiVersion: apps/v1beta2
kind: DaemonSet
itaysk / Makefile
Last active Apr 30, 2020
Embed file in Go using go link flag
View Makefile
b64contents = $(shell base64 -w 0 myfile)
go build -ldflags "-X main.myfile=$(b64contents)"
itaysk / Makefile
Created Apr 29, 2020
Embed file in Go using ELF section
View Makefile
go build -o _main
objcopy --add-section myfile=myfile _main main
itaysk / Makefile
Last active Apr 29, 2020
Embed file in Go using one line go generate
View Makefile
go generate
go build
itaysk / vscode.itermcolors
Created Mar 6, 2018
vscode theme for terminal
View vscode.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<key>Ansi 0 Color</key>
<key>Alpha Component</key>
<key>Blue Component</key>
itaysk /
Created Jan 14, 2017
How to process Event Hub Archive's files using Spark
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("spark-avro-json-sample") \
.config('spark.hadoop.avro.mapred.ignore.inputs.without.extension', 'false') \
avroDf ="com.databricks.spark.avro").load(in_path)
itaysk /
Last active Mar 27, 2019
Kubernetes Pod Conditions
kubectl get po mypod -ojson | jq '.status.conditions[] | select(.type=="mycondition") | .status' -r
You can’t perform that action at this time.