Skip to content

Instantly share code, notes, and snippets.

View msnelling's full-sized avatar

Mark Snelling msnelling

View GitHub Profile
@msnelling
msnelling / git-updater.sh
Created October 11, 2018 13:49
Script to update git repos under directory
#!/bin/bash
# GitSync
#
# Syncs all remotely-tracked branches on a git repo passed as first argument ($1). It also pulls any new branches
# and tags attached to the repo.
#
# $1 - The dir to check
#
GitSync()
@msnelling
msnelling / cifs.sh
Created August 21, 2017 15:35
k8s-plugin-cifs
usage() {
err "Invalid usage. Usage: "
err "\t$0 init"
err "\t$0 mount <mount dir> <json params>"
err "\t$0 unmount <mount dir>"
exit 1
}
debug() {
date +"%Y-%m-%d %H:%M:%S DEBUG: $*" >>/var/log/solaise-cifs.log
{
"firewall": {
"ipv6-name": {
"wan_in-6": {
"default-action": "drop",
"description": "wan_in",
"enable-default-log": "''",
"rule": {
"1": {
"action": "accept",

Keybase proof

I hereby claim:

  • I am msnelling on github.
  • I am marksnelling (https://keybase.io/marksnelling) on keybase.
  • I have a public key ASAsJh3STLx6TF2izWRfUyvKtbbV3exZFi7GramqHAo7-Ao

To claim this, I am signing this object:

@msnelling
msnelling / Install-Miniconda.ps1
Created December 16, 2016 09:01
Installs Miniconda from extracted .exe installer
param(
[string]$Exe7z,
[string]$PackageDir,
[string]$InstallDir
)
Function Expand-ToDirectory {
param(
[string]$Archive,
[string]$TargetDir
@msnelling
msnelling / terraform_ansi_strip.ps1
Created March 30, 2016 07:44
Strip ANSI codes from Terraform output
function Remove-ANSICodes
{
param([string][Parameter(ValueFromPipeline=$true)]$String)
$String -replace '\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]', ''
}
function Run-Command
{
param([string]$Command)