Skip to content

Instantly share code, notes, and snippets.

View rsalmond's full-sized avatar
🤔
but how does computer!?

rob salmond rsalmond

🤔
but how does computer!?
View GitHub Profile
@rsalmond
rsalmond / vs.yaml
Last active November 1, 2023 11:36
istio http rewrite example
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: api1
spec:
hosts:
- example.com
http:
- match:
- uri:
2020/05/22 16:49:47 [INFO] Terraform version: 0.12.25
2020/05/22 16:49:47 [INFO] Go runtime version: go1.12.13
2020/05/22 16:49:47 [INFO] CLI args: []string{"/usr/local/bin/terraform1225", "apply"}
2020/05/22 16:49:47 [DEBUG] Attempting to open CLI config file: /Users/rob/.terraformrc
2020/05/22 16:49:47 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/05/22 16:49:47 [INFO] CLI command args: []string{"apply"}
2020/05/22 16:49:47 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/05/22 16:49:47 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/05/22 16:49:47 [DEBUG] New state was assigned lineage "a6908b1a-6394-b720-38b9-76552571dbd0"
2020/05/22 16:49:47 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
#!/bin/bash
# fetch and decode SSL cert from a remote host
url=$1; shift
if [ -z "${url}" ]; then
echo "Usage: ${0} <url>"
fi
@rsalmond
rsalmond / pinput.sh
Created May 31, 2018 17:10
Pin osx audio input level, prevent "smart" adjustment.
#!/usr/bin/env bash
#Keep the gain pegged at the desired input level
poll=3
vol=100
help() {
cat <<EOF
Usage:
$0 [-h|--help] [-p|--polling=<polling rate>] [-v|--volume=<volume>]
-h, --help Show help
-p, --polling=polling_rate Specify the polling rate in seconds
@rsalmond
rsalmond / editors.sh
Last active July 4, 2017 03:06
A shell meme created via https://max.io/bash.html
#!/bin/bash
#Background Colors
E=$(tput sgr0); R=$(tput setab 1); G=$(tput setab 2); Y=$(tput setab 3);
B=$(tput setab 4); M=$(tput setab 5); C=$(tput setab 6); W=$(tput setab 7);
function e() { echo -e "$E"; }
function x() { echo -n "$E "; }
function r() { echo -n "$R "; }
function g() { echo -n "$G "; }
function y() { echo -n "$Y "; }
function b() { echo -n "$B "; }

Keybase proof

I hereby claim:

  • I am rsalmond on github.
  • I am rsalmond (https://keybase.io/rsalmond) on keybase.
  • I have a public key ASA1007ck3YHg67pFnDOTyFrbkvLEjy1TasC1Q52uM2hHQo

To claim this, I am signing this object:

import boto.ec2
from pprint import pprint
# https://aws.amazon.com/ebs/previous-generation/
# https://aws.amazon.com/ebs/details/
sizes = {
u'standard' : {
'count': 0,
'rate': 0.05
@rsalmond
rsalmond / ytsnarf.sh
Created November 20, 2016 03:46
Grab a youtube video via a socks proxy via some server you have ssh access to.
#!/bin/bash
# start a socks 5 proxy in screen
screen -d -m -S ytsnarf ssh -ND 8080 <your-server>
# dload via proxy
youtube-dl --proxy socks://localhost:8080 $1
# kill the session
screen -X -S ytsnarf quit
@rsalmond
rsalmond / gist:aa5f9636a10548d7d5b310cc51b5334e
Created April 15, 2016 21:11
Devops days Vancouver breakout discussions
2:15
c225 mental health: tech & on call
c100 building devops culture
c400 service discovery
c300 testing in ops
c440 code review / metrics / practices
c485 devops + security & software supply chain mgmt
@rsalmond
rsalmond / php_oboe functions
Last active April 26, 2016 16:48
AppNeta php_oboe function signatures
<?php
/**
* Oboe API for PHP
*
* This can be used for autocompletion in many major PHP editors
* provides documentation for the code
* and can be used on systems where the oboe extension is not loaded
* to provide no-op versions of functionality
*/