Skip to content

Instantly share code, notes, and snippets.

@chrispruitt
chrispruitt / alb_access_logs.sh
Last active July 19, 2024 15:40
Idempotent script for managing an aws alb access log athena table.
#!/bin/bash
# Dependencies:
# - athena-cli - https://github.com/justmiles/athena-cli
# - aws cli
# Prerequisites:
# - AWS ALB Access log s3 bucket
# - AWS ALB Access logs created
# - Update the variables below to match your environment
@chrispruitt
chrispruitt / how-to-install-homebrew-on-manjaro.md
Created September 17, 2022 11:54 — forked from fardjad/how-to-install-homebrew-on-manjaro.md
[How to Install Homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install Homebrew on Manjaro

Steps required to install Homebrew on Manjaro Linux

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
    

pacman -S base-devel

"use strict";
const nodemailer = require("nodemailer");
// async..await is not allowed in global scope, must use a wrapper
async function main() {
// Generate test SMTP service account from ethereal.email
// Only needed if you don't have a real mail account for testing
let testAccount = await nodemailer.createTestAccount();
// create reusable transporter object using the default SMTP transport
# enable terraform autocomplete for zsh
# complete -o nospace -C /usr/local/bin/terraform terraform
# alias execute terraform.sh wrapper in current directory
alias t="./terraform.sh"
_t() {
NAMESPACE_DIR=$(ls | grep namespaces)
export AWS_ORG_CONFIG_FILE_PREFIX=config-
export AWS_ORG_CREDENTIALS_FILE_PREFIX=credentials-
awsorg() {
local org=$1
if [[ -z "$org" ]]; then
unset AWS_ORG
unset AWS_CONFIG_FILE
unset AWS_SHARED_CREDENTIALS_FILE
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: {{ .ProjectName }}
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- windows
awssso() {
# requires:
# - aws cli v2
if [[ -z "$AWS_CONFIG_FILE" ]]
then
local AWS_CONFIG_FILE=~/.aws/config
fi
export AWS_PROFILE=${1}
@chrispruitt
chrispruitt / Dockerfile
Created February 5, 2021 01:22 — forked from dariodip/Dockerfile
Cython in a Docker container
FROM python:3.6
WORKDIR /app
ADD . /app
RUN pip install -r requirements.txt
RUN python setup.py build_ext --inplace
ENTRYPOINT ["python"]
CMD ["app.py"]
#!/usr/bin/env bash
# This file is to be run at the root of a git repo.
# It simply symlinks any .sh files in a .githooks/ directory to the .git/hooks directory,
# effectively installing your versioned git hooks.
# create .git/hooks directory if not exists
(
cd .git || exit 1
mkdir -p hooks

Keybase proof

I hereby claim:

  • I am chrispruitt on github.
  • I am chrispruitt (https://keybase.io/chrispruitt) on keybase.
  • I have a public key ASBo_a5u69MkO2iWWcFY3WCxbGA79O-aL2wNSJ_RQr1ADwo

To claim this, I am signing this object: