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
tombigel /
Last active Nov 9, 2019 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in's Wayback Machine

Mac OS X

To check the current limits on your Mac OS X system, run:

qoomon /
Last active Oct 23, 2019
Setup GitHub Deploy Keys For Travis

Setup Travis Deploy (macOS)

gem install travis

ssh-keygen -t rsa -b 4096 -f 'github_deploy_key' -N ''

cat | pbcopy

set public key as deploy key on github e.g

rm ''

ozbillwang / .travis.yml
Created Aug 1, 2017
terraform validates with Travis CI
View .travis.yml
- tf_version=0.8.8
- tf_version=0.9.11
sudo: required
language: bash
- wget${tf_version}/terraform_${tf_version} -O /tmp/
tanaikech /
Last active Nov 7, 2019
Multipart-POST Request Using Node.js

Multipart-POST Request Using Node.js

Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack.

Sample script 1:

  • You can upload the zip file by converting byte array as follows.
    • At first, it builds form-data.
    • Adds the zip file converted to byte array and boundary using Buffer.concat().
    • This is used as body in request.
jeroensmeets / gist:6e17fc17b5cb156d24f90f222cd9d9e9
Created May 1, 2017
essential parts for let's encrypt renewal under nginx
View gist:6e17fc17b5cb156d24f90f222cd9d9e9
server {
listen 80;
# set root and server_name here
# only serve validation files for Let's Encrypt on port 80
location /.well-known/acme-challenge/ {
try_files $uri /dev/null =404;
# otherwise to SSL
pgilad / percentiles.R
Created Apr 2, 2017
Percentiles plot using R
View percentiles.R
sample.jtl <- read.csv("~/repos/work/csv-percentiles/sample.csv")
sample.jtl$ts <- as.POSIXct(sample.jtl$ts / 1000, origin="1970-01-01")
interval_size <- '5 sec'
wanted_percentiles <- c(0.5, 0.9, 0.95, 0.99)
get_quantiles <- function(items) {
yy <- quantile(items, wanted_percentiles)
equinoxel / main.scss
Created Jan 23, 2017
webpack 2 config capable of loading font-awesome fonts
View main.scss
@import "~normalize-scss/sass/normalize";
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome.scss";
@import "bourbon";
pgilad / chi_square_min_sample.r
Last active Apr 15, 2018
Find minimum sample size to obtain minimum power test in non-centralized chi-square
View chi_square_min_sample.r
u <- c(0.1, 0.3, 0.5)
chi_df <- 3
target_power <- 0.9
chi_base <- qchisq(0.95, chi_df)
get_power <- function(n) {
return (pchisq(q = chi_base, df = chi_df, ncp = n * u %*% u, lower.tail = FALSE))
hallettj / Makefile
Last active Mar 4, 2019
Makefile for transpiling with Babel & Flow in a Node app, or in a client- or server-side shared library
View Makefile
# Makefile for transpiling with Babel in a Node app, or in a client- or
# server-side shared library.
.PHONY: all clean
# Install `babel-cli` in a project to get the transpiler.
babel := node_modules/.bin/babel
# Identify modules to be transpiled by recursively searching the `src/`
# directory.
FutureSharks / splunk-daemonset.yaml
Last active Jun 8, 2019
Creates a Kubernetes DaemonSet that will monitor container logs and forward them to a Splunk Indexer
View splunk-daemonset.yaml
# Create using kubectl:
# $ kubectl create -f splunk-daemonset.yaml
# You should also add config on your indexer to deal with the json formatted files:
apiVersion: extensions/v1beta1
kind: DaemonSet
name: splunk-forwarder
You can’t perform that action at this time.