Skip to content

Instantly share code, notes, and snippets.

View brennanfee's full-sized avatar

Brennan Fee brennanfee

View GitHub Profile
#!/usr/bin/env bash
# Bash "strict" mode
set -euo pipefail
IFS=$'\n\t'
apt-get update
apt-get install -y --no-install-recommends --reinstall virtualbox-guest-utils virtualbox-guest-dkms
vagrant_user_exists=$(id -u vagrant > /dev/null 2>&1; echo $?)
#!/usr/bin/env bash
# Bash "strict" mode
set -euo pipefail
IFS=$'\n\t'
apt-get update
apt-get install -y --reinstall virtualbox-guest-utils virtualbox-guest-dkms virtualbox-guest-x11
vagrant_user_exists=$(id -u vagrant > /dev/null 2>&1; echo $?)
#!/usr/bin/env bash
# ubuntu-install-ansible.sh - Tiny script to do the minimal installation
# required to get a pip installed Ansible.
#
# Bash "strict" mode
set -euo pipefail
IFS=$'\n\t'
# Update
#!/usr/bin/env bash
# mac-install-ansible.sh - This script should do the absolute minimum to get
# Ansible installed. This script is intended to be run to prepare an OS X
# machine to execute an Ansible playbook locally. The playbook should do the
# heavy lifting of setting up the machine. This script is not necessary if
# you intend to run the playbook from a remote host.
# NOTE: Full XCode should be installed manually before this script is run.
#
# Bash "strict" mode
#!/usr/bin/env bash
# mac-set-hostname.sh - This script will set the local machines name and
# domain information. Two parameters are required: <machine name> <domain name>
# Bash "strict" mode
set -euo pipefail
IFS=$'\n\t'
if [[ $# -lt 2 ]]; then
echo "You must pass 2 parameters, the host name and the domain name."
accountsservice
acl
acpi-support
acpid
adduser
adwaita-icon-theme
alsa-base
alsa-utils
anacron
apparmor
@brennanfee
brennanfee / Bash Strict Mode
Last active July 3, 2023 02:34
Script Strict Modes
#!/usr/bin/env bash
# Bash strict mode
([[ -n ${ZSH_EVAL_CONTEXT:-} && ${ZSH_EVAL_CONTEXT:-} =~ :file$ ]] \
|| [[ -n ${BASH_VERSION:-} ]] && (return 0 2> /dev/null)) && SOURCED=true || SOURCED=false
if ! ${SOURCED}; then
set -o errexit # same as set -e
set -o nounset # same as set -u
set -o errtrace # same as set -E
set -o pipefail
@brennanfee
brennanfee / surfing-keys.txt
Created June 17, 2023 16:12
Surfing Keys Settings
settings.lurkingPattern = /https:\/\/github\.com|.*confluence.*/i;
api.mapkey('gt', 'R');
api.mapkey('gT', 'E');
api.mapkey('gk', 'x');
api.mapkey('gb', 'B');
api.mapkey('gf', 'F');
@brennanfee
brennanfee / script.bash
Last active July 3, 2023 03:03
Bash Script Template
#!/usr/bin/env bash
# Author: Brennan Fee
# License: MIT License
# Version: 0.1
# Date: 2023-06-23
# Bash strict mode
([[ -n ${ZSH_EVAL_CONTEXT:-} && ${ZSH_EVAL_CONTEXT:-} =~ :file$ ]] \
|| [[ -n ${BASH_VERSION:-} ]] && (return 0 2> /dev/null)) && SOURCED=true || SOURCED=false
if ! ${SOURCED}; then
@brennanfee
brennanfee / gist:cedfaef37f1f654788eaebdc14fea831
Last active July 3, 2023 18:40
Cleanup Virtualbox Messages
VBoxManage setextradata global GUI/SuppressMessages remindAboutAutoCapture,remindAboutWrongColorDepth,remindAboutMouseIntegration,remindAboutMouseIntegrationOn,remindAboutMouseIntegrationOff,confirmInputCapture,confirmGoingFullscreen