Skip to content

Instantly share code, notes, and snippets.

so0k so0k

Block or report user

Report or block so0k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
so0k /
Last active Dec 10, 2019
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
so0k /
Last active Nov 25, 2019
Swatmobile - AWS Bootstrap gists
resource "aws_budgets_budget" "cloudwatch" {
provider = "aws.billing"
name = "budget-cloudwatch-monthly"
budget_type = "COST"
limit_amount = "1000"
limit_unit = "USD"
time_period_end = "2087-06-15_00:00"
time_period_start = "2017-07-01_00:00"
time_unit = "MONTHLY"
so0k /
Last active Nov 14, 2019

Getting an Alpine shell

Often usefull for in-cluster debugging.

$ kubectl run --generator=run-pod/v1 --image=alpine:3.5 -it alpine-shell -- /bin/sh

detach (without killing the container):

so0k / Query-Registry.ps1
Last active Oct 25, 2019
Query a docker registry v2/_catalog endpoint from powershell
View Query-Registry.ps1
#TODO: handle https & no basic auth as well..
$RegistryEndpoint = "",
$UserName = "user",
$Password = "password"
so0k /
Created Mar 1, 2018
Alpine curl issues

To fix /usr/bin/curl: curl_mime_type: symbol not found Errors when trying to run curl in a running alpine pod.

Right solution: Update base alpine image because this is a bigger issue

Quick fix: run Alpine system upgrade (or upgrade libcurl package specifically):

apk update
apk upgrade
View amazon-eks-nodegroup-with-mixed-instances-custom.yml
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Amazon EKS Node Group'
default: "EKS Configuration"
so0k / spec_helpers.rb
Created May 5, 2019
Ssl rspec SNI test
View spec_helpers.rb
require 'openssl'
require 'socket'
def ssl_peek(host)
ip = ENV['TIP_HOST'] || ''
port = ENV['TIP_PORT'] || '8121'
tcp_client =, port)
ssl_client =
ssl_client.hostname = host
so0k / gist:cdd24d0a4ad92014a1bc
Last active Apr 8, 2019 — forked from defunctzombie/gist:6518292
droplet discovery over digitalocean private networks
View gist:cdd24d0a4ad92014a1bc

Digital Ocean recently released private networking support in their NYC2 Data center.

They also published a blog post on how to setup a new droplet with private networking. But one thing the post doesn't do is tell you how to scale your private network for many boxes. One approach is obviously to edit /etc/hosts (but this gets annoying when you add a new box). A better way is to create an internal DNS zone (via the digital ocean web interface) and have your droplets use it:


setup the internal DNS zone file

  1. Login to digital ocean
  2. Click "DNS" on the right hand menu
so0k /
Last active Mar 1, 2019 — forked from jpsilvashy/
Post Google Sheets form entries to Slack

Post Google Sheets form entries to Slack

By using Google Form's script editor, you can call Slack webhooks when form submissions are made. You can use this script to do things like creating a live feedback form for taking questions from an audience or notifying your team when someone signs up for an event.


First, be sure you're collecting the email address in the form:


View bumpme
Tue Feb 26 08:41:19 UTC 2019
You can’t perform that action at this time.