Skip to content

Instantly share code, notes, and snippets.

View mikesmithgh's full-sized avatar
:shipit:

Mike mikesmithgh

:shipit:
View GitHub Profile
@mikesmithgh
mikesmithgh / lpass
Created February 14, 2024 13:33
lpass fzf wrapper
#!/usr/bin/env bash
lp='/opt/homebrew/bin/lpass'
if (( $# )); then
$lp "$@"
exit $?
fi
if ! $lp status -q; then
@mikesmithgh
mikesmithgh / display-configuration-mac.md
Last active July 17, 2023 12:34
Toggle between widescreen and standard screen aspect ratio

Toggle between widescreen and standard screen aspect ratio

Instructions on how to create bash aliases to quickly toggle between widescreen and standardscreen aspect ratio. The motivation for this toggle is for when you are sharing a widescreen monitor to someone with a standard screen monitor. To avoid disconnecting cables and keeping your current display setup, this will allow you to quickly change the aspect ratio so that the standard screen user can properly read text on your screen.

The following steps were tested with a Dell U3415W monitor and macOS Monterey.

Prereq

@mikesmithgh
mikesmithgh / centos7-chroot.sh
Last active August 22, 2022 17:20 — forked from snixon/centos8-chroot.sh
Build a CentOS7 AWS AMI in a chroot with GPT partitioning scheme
#!/bin/bash -ex
# Build a new Centos7 install on EBS volume in a chroot
# Run from RHEL7 or CentOS7 instance - eg: ami-0c322300a1dd5dc79 in us-east-1 (RHEL 7 official image)
# Script expects a second EBS volume, I add them as /dev/sdf in the console
# When the script completes, turn the second EBS volume into your new AMI through the console.
# Adjust the section below to match the device names you're using. Defaults are for an m5.large
# m5 series requires the updated device names