Skip to content

Instantly share code, notes, and snippets.

provider "aws" {
region = "us-east-1"
}
resource "aws_instance" "app" {
ami = "ami-0c55b159cbfafe1f0",
instance_type = "t2.medium"
subnet_id = data.aws_subnet.default.id
@joshghent
joshghent / enforce_pinned_dependencies.sh
Created September 17, 2025 07:57
Detect pinned dependencies
#!/bin/bash
# Usage: ./enforce_pinned_dependencies.sh [path_to_package.json]
# or ./enforce_pinned_dependencies.sh (will find the package.json in the cwd)
PACKAGE_JSON="${1:-./package.json}"
if [ ! -f "$PACKAGE_JSON" ]; then
echo "❌ Error: package.json not found at '$PACKAGE_JSON'"
exit 1
@joshghent
joshghent / github-actions-scan.sh
Created April 15, 2025 09:25
Create a nice list of github action usage across your organisations repos
#!/bin/bash
# Creates a nice list of github action usage across your organisations repos
# Useful for making sure you are using pinned dependencies
# Idea from this blog post: https://alexwlchan.net/2025/github-actions-audit/
ORG="" # github org name to only search their repos, case sensitive
temp_file=$(mktemp)
for dir in */; do
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet">
function loadScript(src, done) {
var js = document.createElement('script');
js.src = src;
js.onload = function() {
done();
};
js.onerror = function() {
done(new Error('Failed to load script ' + src));
};
document.head.appendChild(js);
version: '3.7'
services:
dokku:
image: dokku/dokku:latest
hostname: dokku.ghent.cloud
environment:
- DOKKU_HOSTNAME=dokku.domain.cloud
- VIRTUAL_PORT=32087
- VIRTUAL_HOST=dokku.domain.cloud
☀️ Weather for January 19th 1970
Wind Speed: 2.6
Temp: 15.6
🏆 70,765 Karma Points
🌞 Completed 6 tasks today
📅 Completed 90 tasks this week
✅ Completed 53,500 tasks so far
⌛ Current streak is 1 days
@joshghent
joshghent / sqs_to_sns.py
Created January 14, 2020 10:29
A small script to push messages from SQS to SNS
# Usage
# $ python sqs_to_sns.py my-queue-name
import boto3
import sys
import queue
import threading
from datetime import datetime
import json
@joshghent
joshghent / debug.txt.enc
Created December 4, 2019 16:15
Terraform Debug Log (Encrypted with Terraform Public Key from Keybase.io)
This file has been truncated, but you can view the full file.