Skip to content

Instantly share code, notes, and snippets.

steve-jansen /
Last active March 29, 2023 04:21
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X


sudo curl -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
steve-jansen / git-update
Created March 8, 2013 16:29
A custom script for git to stash any working changes, checkout master, pull origin master, checkout your working branch, rebase master, and unstash your working changes
View git-update
stash() {
# check if we have uncommited changes to stash
git status --porcelain | grep "^." >/dev/null;
if [ $? -eq 0 ]
if git stash save -u "git-update on `date`";
steve-jansen / ExportVisualBasicCode.bas.vb
Created November 21, 2013 20:56
Excel macro to export all VBA source code in this project to text files for proper source control versioning
View ExportVisualBasicCode.bas.vb
' Excel macro to export all VBA source code in this project to text files for proper source control versioning
' Requires enabling the Excel setting in Options/Trust Center/Trust Center Settings/Macro Settings/Trust access to the VBA project object model
Public Sub ExportVisualBasicCode()
Const Module = 1
Const ClassModule = 2
Const Form = 3
Const Document = 100
Const Padding = 24
Dim VBComponent As Object
steve-jansen / .vault
Last active November 11, 2022 05:24
HashiCorp Vault Token Helper using the OS X Keychain
View .vault
token_helper = "/Users/me/.vault-helper"
steve-jansen /
Created August 19, 2016 01:55
List labels for a docker container
docker inspect -f '{{ range $k, $v := .ContainerConfig.Labels -}}
{{ $k }}={{ $v }}
{{ end -}}' $cid
steve-jansen / Startup.Cmd.cmd
Created March 8, 2013 17:22
A Command Prompt auto-run script to injet DOSKEY macros into the shell from a text file, change the initial working directory to a SUBST'd drive letter, update the PATH to include SysInternal utilities, and log all Command Prompt launches to a history file
View Startup.Cmd.cmd
:: Name: Startup.Cmd.cmd
:: Purpose: Initializes a Windows command prompt shell
:: Author:
:: Revision: April 2012
:: self-install this script, but, don't force an overwrite if an auto run script is already configured
IF /I "%~1"=="/install" (
steve-jansen / Startup.Windows.cmd
Created March 8, 2013 17:18
A Windows batch file designed to run at logon from the Start / Programs / Startup to do the following: SUBST drive letters, wipe the %TEMP% folder, and run the disk defragmenter
View Startup.Windows.cmd
:: Name: Windows Startup.cmd
:: Purpose: A logon script to SUBST drive letters, wipe %TEMP%, and run defrag
:: Author:
:: Revision: April 2012
:: map local folders to drive letters
CALL :MAPDRIVE P: "%USERPROFILE%\Documents\Visual Studio 2010\Projects"
steve-jansen /
Created December 15, 2014 19:11
Export DNS records from Rackspace Cloud DNS to zone files on disk
# exports DNS records from Rackspace Cloud DNS to text files
# Depends on
set -e
steve-jansen / MsDepSvc.Port.cmd
Created February 28, 2013 21:37
Windows batch script to modify the TCP/IP port binding for the Microsoft Web Deployment Agent Service
View MsDepSvc.Port.cmd
:: Name: MsDepSvc.Port.cmd
:: Purpose: Modifies the TCP/IP port that the Web Deployment Agent Service
:: (MsDepSvc) listens on. Tested on Win7 Enterprise 32-bit.
:: Author:
:: Revision: January 2013
steve-jansen /
Last active February 11, 2021 10:44
Mirror a Docker Trusted Registry (DTR) to another registry
read -p "Registry to clone from: " pull_registry
read -p "Username for $pull_registry: " user
read -s -p "Password for $pull_registry: " password
read -p "Registry to clone onto: " push_registry
echo Querying $pull_registry...