Skip to content

Instantly share code, notes, and snippets.

View jhernandezb's full-sized avatar

Jorge Hernandez jhernandezb

View GitHub Profile
@tirumaraiselvan
tirumaraiselvan / setupadmissionwebhook.md
Last active April 28, 2024 10:16
Setup admission webhooks in Kubernetes

Kubernetes default component configuration from kubeadm from HEAD

Build from Head April 10, 2018 Commit: 31d22870b2cf0326384fab154a8adf5155ab6975

API Server

/etc/kubernetes/manifests/kube-apiserver.yaml

@acolyer
acolyer / jessfraz.md
Created November 19, 2017 13:39
Containers, operating systems and other fun things from The Morning Paper
# This tells kubecfg to read its config from the local directory
export KUBECONFIG=./kubeconfig
# Looking at the cluster
kubectl get nodes
kubectl get pods --namespace=kube-system
# Running a single pod
kubectl run --generator=run-pod/v1 --image=gcr.io/kuar-demo/kuard-amd64:1 kuard
kubectl get pods
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active June 18, 2024 11:27
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@tj
tj / main.go
Last active April 10, 2017 06:58
package main
import (
"fmt"
"net/http"
"github.com/apex/go-apex"
"github.com/apex/go-apex/proxy"
)
@thewraven
thewraven / nestedArray.go
Last active July 18, 2018 14:07
Updating a nested field into an array using r.Branch
package main
import (
"fmt"
r "gopkg.in/dancannon/gorethink.v3"
)
type Commentary struct {
From string `gorethink:"from"`
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
import React from 'react'
import { render } from 'react-dom'
import { Match, Link, BrowserRouter as Router } from 'react-router'
import matchSorter from 'match-sorter'
import './styles.css'
const API = 'http://localhost:3000'
const token = localStorage.booksToken || Math.random().toString()
localStorage.booksToken = token
@svcavallar
svcavallar / rabbitmq_reconnect.go
Created September 20, 2016 22:23
Golang example to reconnect to RabbitMQ on a connection closed event
package main
import (
"flag"
"github.com/streadway/amqp"
"log"
"time"
)
var amqpUri = flag.String("r", "amqp://guest:guest@127.0.0.1/", "RabbitMQ URI")