Skip to content

Instantly share code, notes, and snippets.

@so0k
so0k / README.md
Last active November 10, 2020 12:42
AWS CLI ElasticBeanstalk ec2 Queries

AWS CLI snippets

The AWS Command Line Interface is a very powerfull ally to anyone managing AWS Infrastructure.

While automating infrastructure with Terraform, some configuration can be quickly retrieved using AWS CLI.

Alternatively, some information is hard to piece together from the AWS console, in which case terminal scripts can provide fast and simple windows into your cloud.

AWS Documentation

@so0k
so0k / powerline.md
Last active September 18, 2020 14:04

Powerline

http://powerline.readthedocs.io

 mkdir powerlineFonts
 cd powerlineFonts/
 git init
 git remote add origin https://github.com/powerline/fonts.git
 git remote -v
@so0k
so0k / Query-Registry.ps1
Last active June 27, 2020 14:19
Query a docker registry v2/_catalog endpoint from powershell
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
$Filter=".*",
#TODO: handle https & no basic auth as well..
$RegistryEndpoint = "registry.mysite.com",
$UserName = "user",
$Password = "password"
)
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Amazon EKS Node Group'
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: "EKS Configuration"
Parameters:
@so0k
so0k / spec_helpers.rb
Created May 5, 2019 04:58
Ssl rspec SNI test
require 'openssl'
require 'socket'
def ssl_peek(host)
ip = ENV['TIP_HOST'] || '0.0.0.0'
port = ENV['TIP_PORT'] || '8121'
tcp_client = TCPSocket.new(ip, port)
ssl_client = OpenSSL::SSL::SSLSocket.new(tcp_client)
ssl_client.hostname = host
ssl_client.connect
@so0k
so0k / bumpme
Last active February 26, 2019 08:41
Tue Feb 26 08:41:19 UTC 2019
@so0k
so0k / postgres-cheatsheet.md
Last active February 5, 2019 21:06 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

apiVersion: v1
kind: Namespace
metadata:
name: heptio-contour
---
apiVersion: v1
kind: Service
metadata:
name: envoy-external
namespace: heptio-contour
@so0k
so0k / contour.no-host.ingress.addon.yaml
Created January 22, 2019 17:05
Dual contour ingress without host network
apiVersion: v1
kind: Namespace
metadata:
name: heptio-contour
---
apiVersion: v1
kind: Service
metadata:
name: envoy-external
namespace: heptio-contour
@so0k
so0k / contour.ingress.addon.yaml
Last active January 22, 2019 16:24
Dual Contour Ingress configuration
apiVersion: v1
kind: Namespace
metadata:
name: heptio-contour
---
apiVersion: v1
kind: Service
metadata:
name: envoy-external
namespace: heptio-contour