Skip to content

Instantly share code, notes, and snippets.

View akmalharith's full-sized avatar
🏠
Working from home

Akmal Harith akmalharith

🏠
Working from home
View GitHub Profile
@akmalharith
akmalharith / bws-secret-get.sh
Last active February 21, 2024 17:57
Wrapper to get Bitwarden Secrets Manager's secret by the secret's name.
#!/bin/bash
# Usage: ./bws-secret-get.sh <SECRET_NAME>
set -eo pipefail
if [ -z $BWS_ACCESS_TOKEN ]; then
>&2 echo "Missing access token. Please set your access token. Eg: export BWS_ACCESS_TOKEN=REPLACEME"
exit 1
fi
@pahud
pahud / main.ts
Created May 20, 2020 04:08
create or import existing EKS cluster in AWS CDK
import cdk = require('@aws-cdk/core');
import eks = require('@aws-cdk/aws-eks');
import ec2 = require('@aws-cdk/aws-ec2');
import iam = require('@aws-cdk/aws-iam');
import { Stack } from '@aws-cdk/core';
const DEFAULT_CLUSTER_VERSION = '1.16'
export class EksStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
@AlainODea
AlainODea / README.md
Last active March 25, 2024 23:39
Terragrunt config to auto-generate provider and backend config so you can apply library modules directly in infrastructure-live without an adapter module in infrastructure-modules

Using Terragrunt generate for extra DRY Terraform

Terragrunt config to auto-generate provider and backend config so you can apply library modules directly in infrastructure-live without an adapter module in infrastructure-modules.

@mrichman
mrichman / osx_bootstrap.sh
Last active February 5, 2024 13:38
Bootstrap script for setting up a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@vlucas
vlucas / pre-push.sh
Created July 22, 2014 16:12
Prevent Pushes Directly to Master
#!/bin/bash
# @link https://gist.github.com/mattscilipoti/8424018
#
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...