Skip to content

Instantly share code, notes, and snippets.

View purwandi's full-sized avatar
🏠
Working from home

purwandi purwandi

🏠
Working from home
View GitHub Profile
@incfly
incfly / authz.yaml
Created April 29, 2022 18:51
istio-rbac-customize-error-message
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: allow-nothing
namespace: default
spec:
{}
backend httpbin
balance roundrobin
mode http
server master 192.168.50.10:32009 check check-sni httpbin.example.com sni str(httpbin.example.com) ssl verify none
http-request set-header Host httpbin.example.com
http-request set-header X-Forwarded-For %[src]
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
@mimoo
mimoo / compress_tar_gzip.go
Last active March 5, 2024 03:53
How to compress a folder in Golang using tar and gzip (works with nested folders)
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
@glenacota
glenacota / 1master-2datanodes_different_zones-1kibana.yml
Last active August 25, 2022 08:50
Docker-compose file to build up an ElasticSearch cluster with 1 master node, 2 datanodes supporting allocation awareness, and a Kibana instance. (v6.5.4)
version: '3'
services:
master:
image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
container_name: master
environment:
- cluster.name=elastic-cluster
- node.name=master
- node.master=true
- node.data=false
@uraimo
uraimo / dnsovertls.md
Last active March 22, 2024 20:55
Configure your Mac to use DNS over TLS
@danmrichards
danmrichards / docker-compose.yml
Created December 4, 2017 21:51
CockroachDB - Docker Compose Manifest. Spins up a simple 3 node CockroachDB cluster.
version: "3"
services:
roach1:
container_name: roach1
image: cockroachdb/cockroach:v1.1.3
command: start --insecure
ports:
- "26257:26257"
- "8080:8080"
volumes:
@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@visnup
visnup / README.md
Last active September 18, 2017 02:25
RICOH THETA S live 360º video stream rendering in Chrome via WebGL and a <video> texture

To get this working, you'll need the [live-streaming software from RICOH][1]. Install that and follow the [live video instructions][2] to connect your camera to your computer and have it show up as a video source.

If you're on a Mac, you can open up the FaceTime app and test it by picking "THETA UVC Blender" from the Video menu.

Once all of that is working, open up index.html and you should see the video rendered on the inside of a sphere that you can rotate around. Use the mouse to click and drag to move the camera around and the mouse wheel to zoom in and

@dalu93
dalu93 / Fastfile
Last active October 1, 2021 15:22
Fastfile example
fastlane_version "1.49.0"
default_platform :ios
######################
slack_webhook = 'https://...' #See Slack Incoming Webhook
slack_default_channel = '#channel'
default_production_scheme = 'YOUR-PRODUCTION-SCHEME'
certificates_output_path = './certificates'
profiles_output_path = './profiles'
@dhrrgn
dhrrgn / elasticsearch.yml
Last active January 2, 2016 12:29
ElasticSearch Install
cluster.name: "my-es"
index.number_of_shards: 5
index.number_of_replicas: 1
cloud:
aws:
region: us-east-1
access_key: <key here>
secret_key: <secret here>