Skip to content

Instantly share code, notes, and snippets.

@mattsve
mattsve / get-pks-k8s-config.sh
Created April 7, 2021 08:42
Updated script from https://community.pivotal.io/s/article/script-to-automate-generation-of-the-kubeconfig-for-the-kubernetes-user?language=en_US which takes in parameters for getting user and password from password managers. Also detects more errors in fetching tokens
#!/bin/bash -e
# v 0.0.5.1
# get-pks-k8s-config.sh
# [email protected]
function usage()
{
echo "PKS Kubeconfig Helper Script."
echo ""
@mattsve
mattsve / Boxstarter
Last active September 15, 2015 18:08
Win10
Set-WindowsExplorerOptions -EnableShowHidenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Update-ExecutionPolicy Unrestricted
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX
cinst firefox
cinst lastpass
cinst kitty.portable
cinst psget
cinst sublimetext3
cinst syncthing
@mattsve
mattsve / setup.sh
Last active March 19, 2018 20:14
Freebsd
#!/bin/sh
# sysctls for jail needs to be
# allow.raw_sockets=true,allow.sysvipc=1
# Enable sshd
sed -i .bak 's/sshd_enable="NO"/sshd_enable="YES"/' /etc/rc.conf
rm /etc/rc.conf.bak
# Add sudo
pkg install sudo
@mattsve
mattsve / Boxstarter
Last active August 29, 2015 14:18
New windows
Set-WindowsExplorerOptions -EnableShowHidenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Update-ExecutionPolicy Unrestricted
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX
cinst firefox
cinst adblockplusfirefox
cinst lastpass
cinst git
cinst git.install
cinst paint.net