Skip to content

Instantly share code, notes, and snippets.

@dustin-atwood
dustin-atwood / aws_update_vpn
Last active October 14, 2022 14:54
Update an AWS VPN security group and set a description
#!/bin/bash
# This is run via cron whenever my ip address changes in order to update aws security group
##### VARIABLES TO SET ##########################
# set our home directory which holds our ip file
HOMEDIR=~/
# set the name of the security group as show in aws console
#!/bin/bash
# When a commit describes a release, return the version from the commit.
# Supply an argument to prefix the version. defaults to v. Debug mode with -d
# $ tag_release v
# > Release-3-2-1 becomes v3.2.1
opts=${@:2}
[[ $opts == *"-d"* ]] && DEBUG=true
[ $DEBUG ] && echo "Running Debug mode"
prefix=${1:-v}
@dustin-atwood
dustin-atwood / release_commit
Last active May 2, 2022 17:53
Tag the last commit when it's a release branch
#!/bin/bash
# When a commit describes a release, return the version from the commit.
# Supply an argument to prefix the version. defaults to v. Debug mode with -d
# $ tag_release v
# > Release-3-2-1 becomes v3.2.1
opts=${@:2}
[[ $opts == *"-d"* ]] && DEBUG=true
[ $DEBUG ] && echo "Running Debug mode"
prefix=${1:-v}
@dustin-atwood
dustin-atwood / rails http status codes
Created March 30, 2022 15:01 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@dustin-atwood
dustin-atwood / elasticsearch@5
Created March 15, 2021 22:13
Formula for elasticsearch 5.6.16
class ElasticsearchAT5 < Formula
desc "Distributed search & analytics engine"
homepage "https://www.elastic.co/products/elasticsearch"
url "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.tar.gz"
sha256 "6b035a59337d571ab70cea72cc55225c027ad142fbb07fd8984e54261657c77f"
license "Apache-2.0"
bottle :unneeded
keg_only :versioned_formula