Skip to content

Instantly share code, notes, and snippets.

View fishd72's full-sized avatar
🏠
Working from home

Dave Fisher fishd72

🏠
Working from home
View GitHub Profile
@fishd72
fishd72 / Ethernet.md
Last active July 13, 2018 13:18
Ethernet wiring

EIA/TIA 568B Ethernet UTP cable wiring diagram

  • White with orange stripe
  • Orange with white stripe or solid orange
  • White with green stripe
  • Blue with white stripe or solid blue
  • White with blue stripe
  • Green with white stripe or solid green
  • White with brown stripe
  • Brown with white stripe or solid brown
@fishd72
fishd72 / Home-brew.sh
Last active April 3, 2019 17:21
New device setup
#!/bin/bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew cask install 1Password AppCleaner Atom AutoDMG Dropbox balenaEtcher cheatSheet Evernote Firefox Handbrake LaunchControl Mactracker homebrew/cask/ripit Slack homebrew/cask/transmission homebrew/cask/twitch vagrant
brew install dockutil packer shellcheck mackup vfuse
@fishd72
fishd72 / Reset.md
Created August 14, 2018 12:59
Reset the local account passwords on an on-prem JSS

Keybase proof

I hereby claim:

  • I am fishd72 on github.
  • I am fishd (https://keybase.io/fishd) on keybase.
  • I have a public key ASCbh3g-HZVXygsuW9cJvBUmEjvMbwDlNB8GQz12eOqntAo

To claim this, I am signing this object:

  • Package from terminal

pkgbuild --install-location /Applications --component <_path to app_> "<_full path to pkg_>"

npm config set cafile ~/.certs/ca-certs.pem

#!/usr/bin/python
# As written, this requires the following:
# - OS X 10.6+ (may not work in 10.10, haven't tested)
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6)
# - pyObjC (as such, recommended to be used with native OS X python install)
# Only tested and confirmed to work against 10.9.5
# Run with root
#Show all 3rd party Kernel extensions
sudo /usr/bin/sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy 'SELECT * FROM kext_policy;'
#Strip signing from Config Profile
openssl smime -inform DER -verify -in /path/to/downloaded.mobileconfig -noverify -out /path/to/de-signed.mobileconfig
#Format plist
plutil -convert xml1 /path/to/de-signed.mobileconfig
#Get App signature
@fishd72
fishd72 / Logging.sh
Created September 9, 2019 14:38
Bash logging function
# Function to write to the Log file
# Credit to http://linuxadvices.blogspot.com/2013/05/logging-in-bash-nice-subroutine-to-reuse.html
###################################
write_log()
{
while read text
do
LOGTIME=`date "+%Y-%m-%d %H:%M:%S"`
# If log file is not defined, just echo the output
@fishd72
fishd72 / ssh_hostkey.md
Created May 7, 2020 13:53
[SSH Host key management] Managing SSH host keys #ansible #ssh

Messing with SSH Host Keys

Add SSH Host Keys to local known_hosts
ssh-keyscan -H <hostname or IP> >> ~/.ssh/known_hosts

Find SSH Host Keys
ssh-keygen -F <hostname or IP>

Remove SSH Host Keys
ssh-keygen -R \