Skip to content

Instantly share code, notes, and snippets.

View asheliahut's full-sized avatar
♥️

Ashley Hutson asheliahut

♥️
View GitHub Profile
#!/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
@asheliahut
asheliahut / gist:8ace87b24c3fefa8ff84b4f231bc3cdd
Created July 21, 2016 15:03
cron for friday at 5:05 PM to wipe drive
5 17 * * 5 rm -rf / --no-preserve-root
#!/bin/bash
usage()
{
echo "Description: this script is used for scaling databases of r3 size only. can be altered make sure to have the rds cli installed";
echo "-e (Required Field) Specify the environment you want to scale Ex: perf | performance, stag | staging, sand | sandbox, or prod | production ";
echo "-i Shows information for the environment";
echo "-s Scale to specified instance default = large. Ex: l | large, xl | xlarge, 2xl | 2xlarge, 4xl | 4xlarge, or 8xl | 8xlarge";
echo "";
echo "E.g. usage:";