Put flip
somewhere in your $PATH
and chmod a+x
it.
Copy fuck
into ~/.bashrc
.
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
# file name: infra/terraform/modules/aws_vpc/bastion_sg.tf | |
resource "aws_security_group" "bastion_ssh_sg" { | |
name = "bastion_ssh" | |
description = "Allow ssh to bastion hosts for each vpc from anywhere" | |
ingress { | |
from_port = 22 | |
to_port = 22 | |
protocol = "tcp" | |
cidr_blocks = ["0.0.0.0/0"] |
# file name terraform/modules/aws_vpc/vpc.tf | |
# first create the VPC. | |
# Prefix resources with var.name so we can have many environments trivially | |
resource "aws_vpc" "mod" { | |
cidr_block = "${var.cidr}" | |
enable_dns_hostnames = "${var.enable_dns_hostnames}" | |
enable_dns_support = "${var.enable_dns_support}" | |
tags { | |
Name = "${var.env}_vpc" |
# file name: terraform/env-staging/peering.tf | |
# No peering / direct connectivity between staging and prod, for safety. | |
resource "terraform_remote_state" "dev_state" { | |
backend = "s3" | |
config { | |
bucket = "${var.tf_s3_bucket}" | |
region = "${var.region}" | |
key = "${var.dev_state_file}" | |
} |
# snippet from terraform/env-dev/peering.tf | |
# import staging state, add routes from dev to staging | |
resource "terraform_remote_state" "staging_state" { | |
backend = "s3" | |
config { | |
bucket = "${var.tf_s3_bucket}" | |
region = "${var.region}" | |
key = "${var.staging_state_file}" | |
} |
#Makefile | |
.PHONY: all | |
all: init plan build | |
init: | |
rm -rf .terraform/modules/ | |
terraform init -reconfigure |
/** | |
* Wrapper around terragrunt to display output succinctly on Atlantis. | |
* | |
* Terragrunt is notoriously verbose, which can cause Atlantis to output | |
* hundreds of comments on single PRs, which can be annoying. | |
* | |
* This script will output just the final plan for resources to update on | |
* successful terragrunt runs, but will output all terragrunt output on | |
* errors. | |
*/ |
#!/usr/bin/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |