Skip to content

Instantly share code, notes, and snippets.

<section data-transition='concave'>
<section id='local-kubernetes-environments-with-minikube'>
<a href="https://github.com/kubernetes/minikube"><img style="width:30%;" src="https://raw.githubusercontent.com/kubernetes/minikube/master/logo/logo.png" /></a>
<h2>Local Kubernetes Environments</h2>
<h3>with <a href="https://github.com/kubernetes/minikube"><code>minikube</code></a></h3>
<br/>
<h4 class='fragment grow'><a href="http://bit.ly/k8s-minikube"><code>bit.ly/k8s-minikube</code></a></h4>
</section>
<section data-background-transition='fade' data-background='black' id='presented-by-ryanj'>
<p>presented by <a href="http://twitter.com/ryanj/">@ryanj</a>, Developer Advocate at <a href='http://redhat.com' style='color:red;'>Red Hat</a></p>
@ryanj
ryanj / Local-Kubernetes-Environments-with-minikube.html
Last active March 9, 2021 21:09
Local Kubernetes Environments with minikube http://bit.ly/k8s-minikube
<section data-transition='concave'>
<section id='local-kubernetes-environments-with-minikube'>
<a href="https://github.com/kubernetes/minikube"><img style="width:30%;" src="https://raw.githubusercontent.com/kubernetes/minikube/master/logo/logo.png" /></a>
<h2>Local Kubernetes Environments</h2>
<h3>with <a href="https://github.com/kubernetes/minikube"><code>minikube</code></a></h3>
<br/>
<h4 class='fragment grow'><a href="http://bit.ly/k8s-minikube"><code>bit.ly/k8s-minikube</code></a></h4>
</section>
<section data-background-transition='fade' data-background='black' id='presented-by-ryanj'>
<p>presented by <a href="http://twitter.com/ryanj/">@ryanj</a>, Developer Advocate at <a href='http://redhat.com' style='color:red;'>Red Hat</a></p>
@ryan0x44
ryan0x44 / Terraform-Blue-Green-AWS.md
Created November 19, 2015 21:57
Blue-Green AWS Auto Scaling Deployments with Terraform

A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.

In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.

Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.

Overview

I build my AMI's using Packer and Ansible.

######################
# Create The Cluster #
######################
# Tested with minikube v0.30
minikube start \
--vm-driver virtualbox \
--cpus 2 \
--memory 10240
@ChaosJohn
ChaosJohn / __init__py
Last active January 18, 2022 05:18 — forked from seanbehan/app.py
Flask with Django ORM
"""
Located under app/
"""
import os
from django.apps import apps
from django.conf import settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
(ns ansible.core
(:require [clojure.java.shell :as sh]
[clojure.string :as str]
[cheshire.core :as cheshire]
[clojure.java.io :as io])
(:import (java.io File)
(com.fasterxml.jackson.core JsonGenerator)
(java.util Base64)
(java.security MessageDigest MessageDigest$Delegate)))
@lemiorhan
lemiorhan / post-receive
Last active February 8, 2023 10:06
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@blaisep
blaisep / jenkins-pipeline-git-cred.md
Created October 20, 2016 23:33
Insert git credentials into Jenkins Pipeline Script projects

Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs

The Jenkins Pipeline Docs' description of the git pushmethod doesn't have an example using injected credentials. (https://jenkins.io/doc/pipeline/examples/#push-git-repo)

The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin

@GTRekter
GTRekter / setup.sh
Created April 15, 2023 06:58
This is a bash script that configures several organization policies for a specified Azure DevOps organization. The script makes use of the Azure DevOps REST API to perform PATCH requests on the different policies. The policies that are being configured include disallowing third-party application access via OAuth, disallowing SSH authentication, …
PAT=""
ORG_NAME=""
DEFAULT_JSON={
"organization": {
"policies": {
"disallow_third_party_application_access_via_oauth": false,
"disallow_ssh_authentication": false,
"log_audit_events": true,
"allow_public_projects": true,
"additional_protections_public_package_registries": true,
@dorianturba
dorianturba / count_living_per_year_perf.py
Last active April 20, 2023 17:47
Count how many people are alive per year, based on their birthyear and deathyear, aims for performances.
import collections
import random
import timeit
pop = [
(b := random.randint(1900, 2000), random.randint(b + 1, b + 100))
for _ in range(10000)
]