Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Pruski dbafromthecold

View GitHub Profile
@dbafromthecold
dbafromthecold / mssql-cli-ubuntu-22.04
Last active Jun 8, 2022
Installing the mssql-cli on Ubuntu 22.04
View mssql-cli-ubuntu-22.04
#######################################################################################################
#
# How to install the mssql-cli on Ubuntu 22.04 running python 3.10
#
# This is pretty hacky so please only do this on dev/test servers
#
# The first few steps here will also get the mssql-cli working on Ubuntu 20.04 (running python 3.8)
#
#######################################################################################################
@dbafromthecold
dbafromthecold / index.html
Created Jan 30, 2022
Index.html file for Reveal Presentation in Github Pages
View index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Test Presentation</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
@dbafromthecold
dbafromthecold / vimrc
Last active Jan 13, 2022
My vimrc file
View vimrc
"vim generic settings
set number
set nocompatible
set backspace=indent,eol,start
set nowrap
set nobackup
set noswapfile
set noundofile
@dbafromthecold
dbafromthecold / main.go
Last active May 15, 2021
SqlContainerFromScratch
View main.go
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strconv"
"syscall"
@dbafromthecold
dbafromthecold / azure-sql-edge-persistent.yaml
Created Dec 6, 2020
Azure SQL Edge with persistent volume claims
View azure-sql-edge-persistent.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sqledge-deployment
spec:
replicas: 1
selector:
matchLabels:
app: sqledge
template:
@dbafromthecold
dbafromthecold / azure-sql-edge-pvc.yaml
Last active Dec 6, 2020
Persistent Volume Claims for Azure SQL Edge
View azure-sql-edge-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sqlsystem-pvc
spec:
volumeName: sqlsystem-pv
accessModes:
- ReadWriteOnce
resources:
requests:
@dbafromthecold
dbafromthecold / azure-sql-edge-pv.yaml
Created Dec 6, 2020
Persistent Volumes for Azure SQL Edge
View azure-sql-edge-pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: sqlsystem-pv
spec:
capacity:
storage: 1024Mi
accessModes:
- ReadWriteOnce
nfs:
@dbafromthecold
dbafromthecold / azure-sql-edge.yaml
Created Nov 30, 2020
Yaml file to deploy Azure SQL Edge and expose with a load balanced service
View azure-sql-edge.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sqledge-deployment
spec:
replicas: 1
selector:
matchLabels:
app: sqledge
template:
View testnginxingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-testwebsite
annotations:
kubernetes.io/ingress.class: "nginx"
spec:
rules:
- host: www.testwebaddress.com
http:
@dbafromthecold
dbafromthecold / DecodeHelmSecrets.sh
Created Aug 16, 2020
A kubectl plugin to decode secrets created by Helm
View DecodeHelmSecrets.sh
#!/bin/bash
# get helm secrets from Kubernetes cluster
SECRET=$(kubectl get secret $1 -o jsonpath='{ .data.release }' )
# decode the secrets
DECODED_SECRET=$(echo $SECRET | base64 -d | base64 -d | gunzip -c )
# parse the decoded secrets, pulling out the templates and removing whitespace
DATA=$(echo $DECODED_SECRET | jq '.chart.templates[]' | tr -d '[:space:]' )