Skip to content

Instantly share code, notes, and snippets.

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

Victor Yang pydevops

🏠
Working from home
View GitHub Profile
kubectl Cheat Sheet
See also: Kubectl Overview and JsonPath Guide.
Kubectl Autocomplete
$ source <(kubectl completion bash) # setup autocomplete in bash, bash-completion package should be installed first.
$ source <(kubectl completion zsh) # setup autocomplete in zsh
Kubectl Context and Configuration
Set which Kubernetes cluster kubectl communicates with and modifies configuration information. See Authenticating Across Clusters with kubeconfig documentation for detailed config file information.
$ kubectl config view # Show Merged kubeconfig settings.
@derekso
derekso / cf-users.sh
Created April 9, 2018 15:21
Create multiple tenants, users and spaces in Cloud Foundry
#! /bin/bash -e
# This script will create 10 different organizations
# with 2 spaces within each org and 5 users in each org.
# Written by Derek So on 23 Mar 2018
cf login -u admin
TEAMSIZE=10
USERPERTEAM=5
@githubfoam
githubfoam / VirtualBox Cheat Sheet
Last active May 15, 2025 06:38
VirtualBox Cheat Sheet
==========================================================================================================
# 8. VBoxManage
https://www.virtualbox.org/manual/
==========================================================================================================
# Networking Modes
https://www.virtualbox.org/manual/ch06.html#network_bridged
==========================================================================================================
Windows Host
>vboxmanage --version
@aklap
aklap / iterm2.md
Created April 2, 2018 02:11 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
def projectProperties = [
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '1000')),
[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false],
]
properties(projectProperties)
node {
stage('Checkout') {
checkout scm
@tallclair
tallclair / git-repo-demo.yaml
Created March 9, 2018 19:54
More secure GitRepo volumes
# Example of using an InitContainer in place of a GitRepo volume.
# Unilke GitRepo volumes, this approach runs the git command in a container,
# with the associated hardening.
apiVersion: v1
kind: Pod
metadata:
name: git-repo-demo
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
@jasoet
jasoet / kube_cheat_sheet.md
Created March 9, 2018 03:02
Kubernetes Cheat Sheet
@EyeBool
EyeBool / script.py
Last active August 12, 2024 01:59
Tutorial: Creating a Sample Database for InfluxDB
#!/usr/bin/env python
# written for tutorial: https://medium.com/@eyebool/creating-a-sample-database-for-influxdb-102a89464132
FILEPATH = 'citibike_station_data.sample.log'
DATABASE = 'citibike_station_database'
HOST = 'localhost'
PORT = 8086
USER = 'root'
PASSWORD = 'root'
@emiglobetrotting
emiglobetrotting / __readme.md
Created March 2, 2018 18:44 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@crazyguitar
crazyguitar / it.md
Last active February 27, 2019 06:04
system design

System design

Faas concepts

  1. Event driven system - serverless function usually glue the services together and work properly.
  2. Serverless function was called service bus in the past.
  3. The features of serverless function:
    1. short-lived
    2. not a daemon
  4. stateful