Skip to content

Instantly share code, notes, and snippets.

View junoteam's full-sized avatar
😃
Coding hard

Alex Berber junoteam

😃
Coding hard
  • Tel-Aviv
  • 22:10 (UTC +03:00)
View GitHub Profile
@junoteam
junoteam / README.md
Created February 9, 2020 13:10 — forked from tomazzaman/README.md
Kill supervisor on Docker when any of the services fail

Killing supervisor if any of it's child processes fail

The trick is to only register the listener for events that indicate failure, namely

  • PROCESS_STATE_STOPPED
  • PROCESS_STATE_EXITED
  • PROCESS_STATE_FATAL

Once they do, we should send a SIGQUIT to Supervisor.

@junoteam
junoteam / simpleWebApp.yml
Created March 27, 2020 17:56
Kubernetes deployment file for Go application
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service # K8s Service
metadata:
name: simple-web-app-svc
labels:
app: simple-web-app
spec:
@junoteam
junoteam / jenkins-deployment.yml
Last active April 13, 2020 09:50
jenkins-deployment.yml
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
name: jenkins
labels:
app: jenkins
spec:
@junoteam
junoteam / jenkins-ingress.yml
Created April 13, 2020 11:28
jenkins-ingress.yml
# jenkins-ingress
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: jenkins
annotations:
kubernetes.io/ingress.class: nginx
# type of authentication
nginx.ingress.kubernetes.io/auth-type: basic
# name of the secret that contains the user/password definitions
@junoteam
junoteam / web-app-ingress.yml
Last active April 13, 2020 11:29
web-app-ingress.yml
# webapp-ingress
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: webapp
annotations:
kubernetes.io/ingress.class: nginx
# # type of authentication
# nginx.ingress.kubernetes.io/auth-type: basic
# # name of the secret that contains the user/password definitions
@junoteam
junoteam / terraform-ssh-remote-exec.tf
Created April 28, 2021 20:36 — forked from toshimaru/terraform-ssh-remote-exec.tf
How to connect to server via SSH and use remote-exec provisioner.
resource "digitalocean_droplet" "web" {
image = "ubuntu-16-04-x64"
name = "web-1"
region = "sgp1"
size = "512mb"
ssh_keys = [12345]
connection {
type = "ssh"
user = "root"
@junoteam
junoteam / bench.go
Last active February 4, 2024 11:51
benchmark.go
package main
import (
"context"
"fmt"
"log"
"testing"
"time"
"github.com/go-redis/redis/v8"