Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
# MIT No Attribution | |
# | |
# Copyright 2022 Ben Kehoe | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the "Software"), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so. | |
# |
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDFoKe9Fm8nD+K+VcrvEp+Zpkqaz+KacGgXuUO5delooqq/ynaZt3uzD6FgPGJhAAPn2ZjSRQIGlaqeapux6xRp9BRkWFdFQJKrztv4sLMenU5vo/KQzNnCxsIrfqNDHbsLphwB26tarRWKpf9MnscQduhHCVQz6J4uxCdirty5XTV1UXKWWgn1/8jcQaJbcK8NEHvNkBFgA1V35SpGErU5YOQZ4GXQZagqyls7nM003nbRVu7EyDvE9gE54Hlnnd23k28a547WqF23pjI9zl6Jl3SzsZ6gE5NSNzeA6qfqV0yHqgq7kIZ+OiAOwCM5xjdhYzPZ9EpgFx3Sw0/RDIb+M4jE/57OGIqaJnyW6tt+EU3u9RySo67dZn1Xavs+ri+FyM5WiZjblH7IM77eKO1e1x76WbZB7prvWP+0UE9AiS9xP29VC58OQKKBdgNDCzAM8m2WPnyQrisQ1JzbIjrsbx45NN0QL1raeVBwzXg1g8DK0w9hoc3e3QluTyyVTIEEo9w38G/sfxFexlooO/NxsfncjsT+Q5Q5JGuqg6cpMmFXVmMn4uAJmbRCveEvfUOxRnJiXrwLd036ygZmSQ+u2MIKI18fjknEIJt/fz37WrEo1HDcg9qdAezLcJrCXYyXF3Fg+a6qTcA9Umai99On0nevU59ibfYDjcxMnnlCpw== Taylor Ludwig |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
# | |
# VM configuration | |
# | |
# Where to find JVM, if {java.home}/jre exists then that JVM is used | |
# if not then it must be the path to the JRE itself | |
java.home=/opt/coldfusion9/runtime/jre/ | |
# | |
# If no java.home is specified a VM is located by looking in these places in this | |
# order: | |
# |
#!/bin/bash | |
# where to store the sparse-image | |
WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
create() { | |
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
} | |
detach() { |
if (downloadRatio < 1.0) { | |
self.debug.log("Download ratio is poor."); | |
if (current > 0) { | |
self.debug.log("We are not at the lowest bitrate, so switch down."); | |
self.manifestExt.getRepresentationFor(current - 1, data).then( | |
function (representation1) { | |
self.manifestExt.getBandwidth(representation1).then( | |
function (oneDownBandwidth) { | |
self.manifestExt.getRepresentationFor(current, data).then( | |
function (representation2) { |
Build your dotfiles (shell, Vim config) from multiple sources with fresh.
Both of our dotfiles are built using fresh. We source Vim and other config from each other: