Skip to content

Instantly share code, notes, and snippets.

View asheliahut's full-sized avatar
♥️

Ashley Hutson asheliahut

♥️
View GitHub Profile
@asheliahut
asheliahut / DetailedOCIPermissionRefGuide.md
Created March 13, 2026 18:26
Detailed guide around what can be inside {}

OCI IAM — Atomic Permissions Reference ({} Contents)

Permissions are the atomic units of authorization in OCI IAM. Instead of using a verb like use or manage, you can list exact permissions inside {} for surgical least-privilege access.

-- Syntax
Allow group <group> to {PERMISSION_ONE, PERMISSION_TWO} <resource-type> in <location>

-- Example
Allow group AppReaders to {VAULT_INSPECT, VAULT_READ} vaults in compartment Production
@asheliahut
asheliahut / oraclepolicy.md
Created March 13, 2026 18:17
Oracle Policy Syntax Guide Simplified

Oracle Cloud Infrastructure (OCI) — IAM Policy Syntax

Overview

OCI IAM policies control who can access which resources, how, and under what conditions. All resources have an implicit deny by default — access must be explicitly granted via policy statements. Policies are collections of one or more statements written in a human-readable language.


Basic Syntax

#!/usr/bin/env bash
set -euo pipefail
#---------------- CONFIGURATION ----------------#
GITHUB_ORG="your-org-here" # Replace with your GitHub organization
MAX_PRS=0 # Maximum number of PRs to create (0 for unlimited)
SEARCH_LIMIT=1000 # Limit for search results
BRANCH_NAME="fix/update-workflow-always-conditions"
PR_TITLE="Replace always() with !cancelled() in workflows"
@asheliahut
asheliahut / brioche_install.sh
Created May 19, 2024 04:00
Installs brioche package manager for a specific architecture
#!/bin/bash
install_brioche() {
local base_url="https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main"
local target_dir="$HOME/.local/bin"
local target_file="$target_dir/brioche"
mkdir -p "$target_dir"
# Detect architecture
@asheliahut
asheliahut / hacs.sh
Last active February 13, 2024 08:22
Run Hacs on Dev HA
#!/bin/bash
# wget -O - https://get.hacs.xyz | bash -
set -e
RED_COLOR='\033[0;31m'
GREEN_COLOR='\033[0;32m'
GREEN_YELLOW='\033[1;33m'
NO_COLOR='\033[0m'
declare haPath

Numbered List

  1. Item 1
  2. Item 2
  3. Item 3
@asheliahut
asheliahut / asg.tf
Last active May 2, 2020 06:48
ECS Cluster does not swap Capacity Providers on ASG swap.
resource "aws_autoscaling_group" "cluster_asg" {
# Apply the name based on an existing pattern
name = "${local.cluster_name}-asg-lt${aws_launch_template.cluster_lt.latest_version}"
# Does forceful delete on termination
force_delete = var.delete_on_termination
# https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#waiting-for-capacity
wait_for_capacity_timeout = var.asg_wait_timeout
@asheliahut
asheliahut / example.php
Last active February 7, 2020 16:30
ObjectCheckFirst
<?php
// This is an object that can come from a few sources into a reusable resolve for urls for a graphql resolver
// can also be an array from a different source.
$value = (object) ['url' => 'https://example.com'];
// As array
$arrayValue = ['url' => 'https://example.com'];
/**
* The normal definition for the function is in the doc block.

Keybase proof

I hereby claim:

  • I am asheliahut on github.
  • I am asheliahut (https://keybase.io/asheliahut) on keybase.
  • I have a public key ASDtgxHyB3JGy78_zRJgqHy2CPNkFSi-VCCiTlYU7YAntwo

To claim this, I am signing this object:

@asheliahut
asheliahut / imout1.txt
Last active July 28, 2016 23:36
Git shell oneline to squash all of master history
git checkout master; git log master --oneline | tail -1 | egrep -o '[0-9]+' | xargs git reset; git add ./; git commit -n -m "FUCK YOU I'M OUT"; git push -f -u origin master