Skip to content

Instantly share code, notes, and snippets.

View mike-seagull's full-sized avatar
💭
The early bird catches the worm. The early worm... gets eaten.

Mike Hollister mike-seagull

💭
The early bird catches the worm. The early worm... gets eaten.
View GitHub Profile
@mike-seagull
mike-seagull / runme.sh
Last active August 14, 2023 01:30
Convert Mac dmg to iso
# use this to create a bootable MacOS iso from the install app in the app store
# tested with Monterey and Ventura
# must be run as root
MACOS_VERSION=Ventura
hdiutil create -o /tmp/${MACOS_VERSION} -size 15000m -volname ${MACOS_VERSION} -layout SPUD -fs HFS+J
hdiutil attach /tmp/${MACOS_VERSION}.dmg -noverify -mountpoint /Volumes/${MACOS_VERSION}
/Applications/Install\ macOS\ ${MACOS_VERSION}.app/Contents/Resources/createinstallmedia --volume /Volumes/${MACOS_VERSION} --nointeraction
@mike-seagull
mike-seagull / python_selenium.py
Last active March 16, 2020 17:53
python selenium test
# https://medium.com/@griggheo/running-selenium-webdriver-tests-using-firefox-headless-mode-on-ubuntu-d32500bb6af2
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
#!/bin/sh
: <<'END'
Michael Hollister
December 30, 2019
autostarts an openvpn client and allows connections on the local network
END
FLAGFILE=/var/run/routes-are-running
@mike-seagull
mike-seagull / peck_ip
Last active June 12, 2019 15:22
ping to remote url
#!/bin/bash
: <<'END'
Michael Hollister
Jun 12, 2019
pings an ip or domain once
intended to be used as an alerting system in cron job
example cron: '*/1 * * * * /usr/local/bin/ping_ip github.com' #pings once per minute
@mike-seagull
mike-seagull / smb-perch
Last active March 18, 2019 23:09
mount a samba share in linux
SMB_IP=""
SMB_SHARE="" # eg. /Share
MNT_POINT=""
USER=""
PASSWORD="" # escape special characters eg. "P@\$\$W0rd\!"
LOCAL_UID="0"
LOCAL_GID="0"
# install
apt-get install cifs-utils
@mike-seagull
mike-seagull / tc-perch
Last active February 14, 2019 17:01
mounts a time capsule share to Linux
#!/bin/bash
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#
# Runs on all GNU/Linux distros (install cifs-utils)
@mike-seagull
mike-seagull / ssowl
Last active February 26, 2019 00:18
Encode and decrypt a file or directory using openssl and a password
#!/bin/bash
: <<'END'
Michael Hollister
14-Feb-19
encrypts and decrpyts resources
originally used for storing Travis CI resources in public GitHub repos
END