Skip to content

Instantly share code, notes, and snippets.

View mmm's full-sized avatar

Mark Mims mmm

View GitHub Profile
@mmm
mmm / tmux-utils
Last active December 11, 2023 17:12
tmux fuzzy launcher
#!/bin/bash
__tmux_find_session_like() {
local requested_session=$1
tmux list-sessions | sed -E 's/:.*$//' | fzf --filter=$requested_session --no-sort
}
__tmux_create_or_attach_to() {
local requested_session=$1
#!/bin/bash
#
# Screencast Capture for Linux
#
# This script uses `ffmpeg` to capture an hd1080 screencast.
# The output is # organized by `scene->shot->take` and saves files into
#
# $(cwd)/
# -> ${scene_name}/
# -> shot-${shot_number}/
#!/bin/bash
#
# Multi-monitor Screencast Capture for Linux
#
# This script uses `ffmpeg` to simultaneously capture
# inputs:
# - hd1080 monitor with "Slides" fullscreen
# - hd1080 monitor "Demo" screen (usually terminal and/or browser)
# - hd1080 webcam (h264)
# - audio (aac)
slides = $(wildcard *-*.md)
default: $(slides:.md=.docx)
pdfs: $(slides:.md=.pdf)
#run_pandoc := docker run --rm -t \
#-v `pwd`:/source \
#-v `python -c
#!/bin/bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
cat > /etc/apt/sources.list.d/docker.list <<EOM
deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
EOM
apt-get -qqy update
apt-get -qqy install docker-ce docker-compose
@mmm
mmm / reservations.rb
Last active December 28, 2016 11:23
checked used -vs- reserved instances in ec2
#!/usr/bin/ruby
# reports used -vs- reserved instances in ec2
#
# needs `{apt-get,brew} install awscli` with an `AWS_PROFILE` configured
require 'json'
def reserved_instances
JSON(`aws --profile=#{AWS_PROFILE} ec2 describe-reserved-instances`)["ReservedInstances"]
end
all: authorized_keys config
authorized_keys: authorized_keys.d/*
cat $^ > $@
config: config.d/*
cat $^ > $@
clean:
rm -f authorized_keys
### Keybase proof
I hereby claim:
* I am mmm on github.
* I am m_3 (https://keybase.io/m_3) on keybase.
* I have a public key whose fingerprint is 0D9E DC5F 633B 05D4 7633 42C3 76D4 635F B2A3 4D75
To claim this, I am signing this object:
######### CREATE A SERVICE #################
configure
service
add “SMTPS_587_TCP”
ip-type 6
port-begin 587
port-end 587
end
finished
@mmm
mmm / ubuntu-preseed
Last active July 19, 2019 20:19
kyle's preseed
## Options to set on the command line
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i netcfg/choose_interface select auto
d-i netcfg/wireless_wep string