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

Keybase proof

I hereby claim:

  • I am pgilad on github.
  • I am pgilad ( on keybase.
  • I have a public key ASBURBqbd1OGVMnPWZLRaIr3vrOADTQSDCGadoHfy_5d1go

To claim this, I am signing this object:

pgilad / docker-compose-opt.service
Last active Aug 19, 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 / 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 / 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 Mar 6, 2019
Supporting files for my blog post on remote jmx Spring Boot debugging
package com.example.demo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
public class DemoController {
pgilad /
Created Feb 17, 2019
An example on how to use WebFluxTest to test a Spring Boot WebFlux Controller
import org.apache.commons.lang3.RandomUtils;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
pgilad /
Created Feb 9, 2019
Get most popular commit message and strip JIRA prefix tag
pgilad / build.gradle.kts
Last active Jan 28, 2019
Create a revision for file
View build.gradle.kts
fun digest(file: File, algorithm: String): String {
val contents = file.readBytes()
val messageDigest = MessageDigest.getInstance(algorithm)
val digestBytes = messageDigest.digest(contents)
return String.format("%032x", BigInteger(1, digestBytes)).substring(0..9)
project(":jetpack").configure {
apply(plugin = "com.github.johnrengelman.shadow")
You can’t perform that action at this time.