Skip to content

Instantly share code, notes, and snippets.

View pathcl's full-sized avatar

pathcl

View GitHub Profile
@pathcl
pathcl / vspheresc.yaml
Created February 17, 2019 19:15
vspheresc.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: default
annotations:
storageclass.kubernetes.io/is-default-class: "true"
parameters:
diskformat: thin
fstype: ext3
provisioner: kubernetes.io/vsphere-volume
@pathcl
pathcl / git_rebase.md
Created October 21, 2018 11:25 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@pathcl
pathcl / vscode.json
Last active March 27, 2019 20:24
vscode.json
{
"workbench.colorTheme": "GitHub Plus",
"sublimeTextKeymap.promptV3Features": true,
"python.pythonPath": "/usr/bin/env python3",
"editor.minimap.enabled": false,
"window.zoomLevel": 0,
"window.title": "${activeEditorLong}",
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.multiCursorModifier": "ctrlCmd",
@pathcl
pathcl / main.go
Created July 23, 2018 11:06 — forked from zupzup/main.go
ElasticSearch to Prometheus Exporter in Go
package main
import (
"context"
"github.com/go-chi/chi"
"github.com/go-chi/render"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
log "github.com/sirupsen/logrus"
"gopkg.in/olivere/elastic.v6"
@pathcl
pathcl / flink-consul.py
Created June 28, 2018 11:54
flink consul health check script
@pathcl
pathcl / clusterrolebindings.yml
Created April 20, 2018 17:17 — forked from jimmycuadra/clusterrolebindings.yml
Default RBAC cluster roles and cluster role bindings built into Kubernetes
apiVersion: v1
items:
- apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
creationTimestamp: 2017-02-23T00:03:51Z
name: cluster-admin
namespace: ""
resourceVersion: "35"
selfLink: /apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindingscluster-admin
@pathcl
pathcl / kubectl.md
Created April 16, 2018 18:16 — forked from so0k/kubectl.md
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
@pathcl
pathcl / local.conf
Created April 14, 2018 00:13
devstack
[[local|localrc]]
# Load the external LBaaS plugin.
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
enable_plugin octavia https://git.openstack.org/openstack/octavia
# ===== BEGIN localrc =====
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
RABBIT_PASSWORD=password
@pathcl
pathcl / ejemplo.py
Created April 9, 2018 20:46
Ejemplo gam
import sys
from gam import ProcessGAMCommand
info = ProcessGAMCommand(['ejemplo.py', 'info', 'user', 'template.user'])
@pathcl
pathcl / nodejs.sh
Created April 4, 2018 20:53
nodejs.sh
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28