Skip to content

Instantly share code, notes, and snippets.


Gilad Peleg pgilad

View GitHub Profile
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 Mar 17, 2020
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 - && \
kenvontucky / karma.conf.js
Created Sep 24, 2018
karma puppeteer headless chrome
View karma.conf.js
// Karma configuration file, see link for more information
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function (config) {
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
lopugit / gist:21f5b55e0eb656c1d4dccccf89ec8310
Last active Oct 20, 2019
Setting the Mac hostname or computer name from the terminal
View gist:21f5b55e0eb656c1d4dccccf89ec8310
This article provides instructions on setting the hostname of a Mac OS X workstation from the terminal.
This can be useful when configuring your workstation remotely through ssh, or when you need to change the fully qualified hostname of the workstation (which can't be done from the UI).
Note: The following procedure is for informational purposes only and is not an Autodesk certified or supported workflow. Should issues arise with this procedure, they will not be addressed by Autodesk Customer Support.
Perform the following tasks to change the workstation hostname using the scutil command.
Open a terminal.
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 (
bobvanderlinden / pom.xml
Created May 27, 2018
go-offline failure case
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
<name>My Dependency Test</name>
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.


View docker-compose.yaml
version: '2.1'
container_name: grafana
image: proxx/grafana-armv7
user: "1000"
- 3000:3000
- /opt/grafana:/etc/grafana:rw
pgilad /
Last active Oct 20, 2020
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 \
You can’t perform that action at this time.