Skip to content

Instantly share code, notes, and snippets.

View zackproser's full-sized avatar
💭
Studying 📖

Zack Proser zackproser

💭
Studying 📖
View GitHub Profile
@zackproser
zackproser / Install Hashicorp Nomad on Linux
Created May 1, 2023 12:17
A shell script to install an arbitrary version of HashiCorp Nomad on a Linux system
#!/usr/bin/env bash
TARGET_RELEASE="1.5.3"
cd "$(mktemp -d)" || exit
wget https://releases.hashicorp.com/nomad/${TARGET_RELEASE}/nomad_${TARGET_RELEASE}_linux_amd64.zip
unzip nomad_${TARGET_RELEASE}_linux_amd64.zip
@zackproser
zackproser / config.yml
Last active March 16, 2021 15:15
CircleCI Workflows version upgrade
workflows:
# We need to upgrade this version to 2 across all our repos to be able to use the context nodes!
version: 1
build-and-test:
jobs:
- test:
context:
- Gruntwork Admin
filters:
tags:
@zackproser
zackproser / add-or-edit-license.sh
Last active April 12, 2021 23:57
add-or-edit-license.sh
#!/usr/bin/env bash
YEAR=$(date +"%Y")
FULLNAME="Gruntwork, LLC"
function create_license {
cat << EOF > LICENSE.txt
MIT License
Copyright (c) 2016 to $YEAR, $FULLNAME
@zackproser
zackproser / circle-ci-workflows-upgrade.sh
Last active March 15, 2021 22:16
circle-ci-workflows-upgrade.sh
#!/usr/bin/env bash
echo "Upgrading CircleCI workflows syntax to 2..."
yq w -i .circleci/config.yml 'workflows.version' 2
# remove stray merge tags from the final output
sed -i '/!!merge /d' .circleci/config.yml
@zackproser
zackproser / update-all-repo-names.sh
Created March 15, 2021 20:30
update-all-repo-names.sh
#!/usr/bin/env bash
# We renamed a ton of our repos to the Terraform Registry naming format. This script uses grep and sed to search for
# references to the old names and replace them with the new names.
# Bash doesn't have a good way to escape quotes in strings. The official solution is to list multiple strings next
# to each other (https://stackoverflow.com/a/28786747/483528), but that becomes unreadable, especially with regex.
# Therefore, to make our regex more readable, we are declaring clearly-named variables for the special characters we
# want to match, and including those in a string with no need for escaping or crazy concatenation
readonly DOUBLE_QUOTE='"'
readonly SINGLE_QUOTE="'"
@zackproser
zackproser / add-mit-license.sh
Created March 13, 2021 00:09
Demonstrate adding an MIT license with the correct current year
#!/usr/bin/env bash
YEAR=$(date +"%Y")
FULLNAME="Gruntwork, LLC" # Replace with your company's name!
function create_license {
cat << EOF > LICENSE.txt
MIT License
Copyright © $YEAR, $FULLNAME
const glob = require('glob')
const path = require('path')
var getDynamicRoutes = function() {
return [].concat(
glob
.sync('*.md', { cwd: 'posts/' })
.map((filepath) => `/software/${path.basename(filepath, '.md')}`),
glob
.sync('*.md', { cwd: 'blog/' })
<template>
<b-carousel id="carousel1"
style="color: #000;"
:interval="6000"
v-model="slide"
@sliding-start="onSlideStart"
@sliding-end="onSlideEnd"
>
<testimonial-card
v-for="testimonial in testimonials"
<template>
<section :class="`section pb-0 bg-gradient-${this.getClassType()}`">
<div class="row row-grid">
<div class="col">
<div
class="container card card-lift--hover shadow border-0 mt-5"
>
<div class="row">
<h2 class="display-2 m-5">
{{ post.attributes.title }}
<template>
<div class="col-lg-4">
<div class="card card-list--hover shadow border-0">
<div class="card-body py-5">
<img
:src="`/${post.attributes.image}`"
class="img-fluid shadow mb-5"
/>
<nuxt-link :to="`/software/${post.slug}`">
<h6 :class="`text-${ct} display-4 text-uppercase`">