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 / build.gradle
Last active Dec 26, 2018
How to create reproducible builds in spring using buildInfo
View build.gradle
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
springBoot {
mainClassName = 'com.blazemeter.dagger.DaggerApplication'
buildInfo {
properties {
time = null
pgilad / account.ts
Last active Dec 26, 2018
An example of a model wrapping read only state using Typescript
View account.ts
import _ from 'lodash';
import produce from 'immer';
import { IAccount } from '../../types/account';
import { IData, IModifiable, ProduceRecipe } from '../metadata';
* An account model
export class Account implements IModifiable<IAccount>, IData<IAccount> {
readonly data: Readonly<IAccount>;
pgilad / script.js
Created Dec 2, 2018
Minimal compiler for typescript files
View script.js
const ts = require('typescript');
const tsConfig = require('./tsconfig.json');
const config = tsConfig.compilerOptions;
function compile(fileNames, options) {
if (fileNames.filter(Boolean).length === 0) {
console.log('No files');
pgilad /
Last active Sep 19, 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 /
Last active Dec 26, 2018
An example of a pre-set scheduler for paralleling reactive work
public static final Scheduler scheduler = Schedulers.fromExecutorService(new ThreadPoolExecutor(4, 10, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()))
pgilad / test.php
Created Oct 24, 2018
Php instance property mutation
View test.php
class State {
public $foo = 0;
class Mutator {
public function mutateState(State $state) {
$state->foo = 4;
yoavweiss /
Created Oct 7, 2018
Remap § to Esc and Esc to F24
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000029}, {"HIDKeyboardModifierMappingSrc":0x700000029,"HIDKeyboardModifierMappingDst":0x700000073}]}'
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 / main.go
Created Aug 8, 2018
Generate stable random name from string (used to generate docker tag from git branch)
View main.go
package main
import (
View How we use cloudfront and

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.


You can’t perform that action at this time.