Skip to content

Instantly share code, notes, and snippets.


Gilad Peleg pgilad

Block or report user

Report or block pgilad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pgilad / Dockerfile
Last active Aug 18, 2019
Minimal Spring Boot 2 on Docker Alpine with Java 11 (Using Jigsaw modules)
View Dockerfile
FROM alpine:3.8 AS builder
ARG JDK_TAR=openjdk-11+28_linux-x64-musl_bin.tar.gz
wget -q "$JDK_DOWNLOAD_PREFIX/$JDK_TAR.sha256"
RUN cat $JDK_TAR.sha256 | xargs -I{} echo "{} $JDK_TAR" | sha256sum -c - && \
pgilad / docker-compose-opt.service
Created Aug 17, 2019
Docker Compose Pi3 Applications Service
View docker-compose-opt.service
# File: /etc/systemd/system/docker-compose-opt.service
Description=Docker Compose Opt Service
pgilad /
Last active Aug 15, 2019
Git commit-msg hook to validate for jira issue or the word merge


  • copy the file commit-msg to .git/hooks/commit-msg
  • make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

pgilad / lambda-talk.js
Created Aug 15, 2019
AWS Lambda PolyTalk Slack Integration
View lambda-talk.js
const querystring = require('querystring');
const request = require('request-promise-native');
// You must bundle the latest version of the AWS JS SDK (2.7.9)
// The built-in SDK version does not know about the Polly text-to-speech service.
const AWS = require('aws-sdk');
const SLACK_TOKEN = process.env.SLACK_TOKEN;
const SLACK_UPLOAD_URI = '';
const AUDIO_FILENAME = 'audio.mp3';
pgilad /
Last active Aug 13, 2019
Generate SSL Certificate for use with Webpack Dev Server (OSX)

Generate private key

$ openssl genrsa -out private.key 4096

Generate a Certificate Signing Request

openssl req -new -sha256 \
pgilad / apache-zeppelin.rb
Created Jul 14, 2019
Apache Zeppelin Brew Formula 0.7.3 (for AWS Glue compatibility)
View apache-zeppelin.rb
class ApacheZeppelin < Formula
desc "Web-based notebook that enables interactive data analytics"
homepage ""
url ""
sha256 "7e657df51ecfd4aad39d42f8578409692244d36b2da92b5dbd3b6957b829bf58"
head ""
bottle :unneeded
def install
pgilad /
Last active Jun 8, 2019
Get k8s dashboard token for dashboard
#!/usr/bin/env fish
kubectl -n kube-system describe secrets (kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}') | awk '/token:/ {print $2}'
pgilad /
Created Jun 6, 2019
Get ALL resources in k8s namespace
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found
pgilad /
Last active Apr 29, 2019
Try to use WebFilter in Spring Boot Webflux in order to log request body
package com.blazemeter.dagger.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;
pgilad /
Created Feb 9, 2019
Get most popular commit message and strip JIRA prefix tag
You can’t perform that action at this time.