Skip to content

Instantly share code, notes, and snippets.

View jufemaiz's full-sized avatar
🔌
CTO at @enosi

Joel Courtney jufemaiz

🔌
CTO at @enosi
View GitHub Profile
@jufemaiz
jufemaiz / bash
Created October 10, 2024 04:10
Terraform aws_ssm_parameter issues
$ terraform plan
module.data_aws_ssm_parameter_path_to_a_parameter.data.aws_ssm_parameter.path_to_a_parameter: Reading...
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform planned the following actions, but then encountered a problem:
@jufemaiz
jufemaiz / README.md
Last active October 24, 2023 03:54
OpenNEM pricing checks

Pricing checks

Looking at OpenNEM the values for pricing, particularly during the mid to late 2000s, don't seem correct.

@jufemaiz
jufemaiz / Dockerfile.313
Last active July 23, 2021 04:23
Makefile issues with golang using alpine 3.14
FROM alpine:3.13
RUN apk add --no-cache make
COPY . /app
WORKDIR /app
RUN make path
@jufemaiz
jufemaiz / aggregate.rb
Last active January 4, 2021 04:43
AU-NSW COVID-19 data aggregation
# frozen_string_literal: true
require 'csv'
require 'fileutils'
require 'open-uri'
TEMP_DIRECTORY = 'tmp'
# Create temp file
@jufemaiz
jufemaiz / account_a_remote_access_policy.tf
Created July 23, 2020 08:26
Basic terraform for remote account ECR access by an ECS
resource "aws_ecr_repository" "account_a" {
name = var.ecr_name
tags = local.tags
}
resource "aws_ecr_repository_policy" "account_a" {
repository = aws_ecr_repository.this.name
policy = data.aws_iam_policy_document.account_a.json
@jufemaiz
jufemaiz / bastion-the-easy-way.sh
Created July 9, 2019 01:30
Bastion the easy way!
# bastion-the-easy-way.sh
#
# Allowing you to easily bastion into a remote location! So nice!
#
# $ bastion path_to_target_key path_to_bastion_key target_ip_address bastion_ip_address target_user bastion_user
function bastion {
__message='Welcome to bastion the easy way!'
ssh -f -i ${2:-$__bastion_key} -L 6969:${3:-$__target_ip_address}:22 ${6:-ec2-user}@${4:-$__bastion_address} echo $__message
ssh -i ${1:-$__target_key} ${5:-ec2-user}@localhost -p 6969 -o "UserKnownHostsFile /dev/null"
}
@jufemaiz
jufemaiz / network-postcode-data.json
Created October 19, 2016 05:32
Australian Electricity Networks and Postcodes
[
{
"Comments": "Cross over suburb",
"Contact": "131 388",
"DB": "Ausgrid",
"Pcode": "2121",
"Quoting": "Y",
"State": "New South Wales"
},
{

Keybase proof

I hereby claim:

  • I am jufemaiz on github.
  • I am jufemaiz (https://keybase.io/jufemaiz) on keybase.
  • I have a public key ASB-1QCzoC8jwVo-4WVzdQzqBqBRpka_DGTD5_6Z5u-wIAo

To claim this, I am signing this object:

@jufemaiz
jufemaiz / rails.config
Created July 7, 2014 01:15
.ebextensions/rails.config
files:
# Make the appropriate directories
"/opt/elasticbeanstalk/hooks/appdeploy/pre/020_bootstrap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# /opt/elasticbeanstalk/hooks/appdeploy/pre/01a_bootstrap.sh
@jufemaiz
jufemaiz / delayed_job.rake
Created August 22, 2018 01:26
Delayed::Job container based rake tasks
# Shamelessly ripped from Delayed::Job tasks
# Ref: https://github.com/collectiveidea/delayed_job/blob/master/lib/delayed/tasks.rb
namespace :jobs do
namespace :container do
desc 'Clear the delayed_job queue.'
task clear: :environment do
Delayed::Job.delete_all
end
desc 'Start a delayed_job worker.'