Skip to content

Instantly share code, notes, and snippets.

View naamancampbell's full-sized avatar

Naaman Campbell naamancampbell

  • Brisbane, Australia
View GitHub Profile
@naamancampbell
naamancampbell / README.md
Last active July 24, 2026 01:34
Amazon Bedrock Models for Claude Code in Docker Sandbox

README

Overview

Instructions to build a locally-hosted, containerised Claude Code.

Why?

  • run Claude Code in Bypass Permissions (--dangerously-skip-permissions) mode whilst isolated from the host machine
  • use Claude Code without an Anthropic subscription or without permission to use Anthropic models on Amazon Bedrock
  • use Amazon Bedrock models via access to AWS account (models approved by default)
@naamancampbell
naamancampbell / awscli-sso-config.sh
Last active November 16, 2022 03:15
awscli-sso-config - generates AWS CLI config file for SSO accounts and roles
#!/bin/bash
#
# awscli-sso-config - generates AWS CLI config file for
# SSO accounts and roles
#
# Usage: ./awscli-sso-config.sh aws_profile sso_start_url [--resume]
#
# Requires: awscli, jq
#
# Author: Naaman Campbell
@naamancampbell
naamancampbell / OneDrive.env
Last active September 1, 2021 10:19
rclone OneDrive User Mount - Ubuntu 21.04 Hirsuite Hippo
REMOTE_NAME=OneDrive
MOUNT_DIR=/home/USERNAME/OneDrive
RCLONE_MOUNT_VFS_CACHE_MODE=writes
@naamancampbell
naamancampbell / aws_reinvent_language_filter.js
Created November 27, 2020 22:58
Removes language-tagged AWS re:invent sessions from the https://virtual.awsevents.com/agenda Session Catalog
let excludedLanguages = ['Chinese', 'French', 'Italian', 'Japanese', 'Korean', 'Portuguese', 'Spanish']
for (const tagsDiv of document.querySelectorAll(".event-list-item-tags")) {
for (const tagDiv of tagsDiv.querySelectorAll(".tag")) {
if (excludedLanguages.includes(tagDiv.textContent)) {
let parentDiv = tagsDiv.closest(".event-list-item")
parentDiv.parentNode.removeChild(parentDiv)
break
}
}
---
title: "Boy Swallows Universe - Routes"
author: "Naaman Campbell"
date: "11 January 2020"
output:
html_document:
code_folding: hide
---
```{r setup, include=FALSE}
@naamancampbell
naamancampbell / copy_lambda_env_vars.py
Last active May 30, 2019 10:12
Copy AWS Lambda environment variables from source Lambda function to destination Lambda function
import argparse
import boto3
"""
Usage: copy_lambda_env_vars.py [-h] [--src-profile-name SRC_PROFILE]
[--dst-profile-name DST_PROFILE]
src_function dst_function
Utility to copy environment variables from source Lambda function to
destination Lambda function.
@naamancampbell
naamancampbell / function.json
Created January 2, 2018 11:35
Strava API Subscription Webhook on Azure Functions
{
"bindings": [
{
"type": "httpTrigger",
"direction": "in",
"name": "req",
"authLevel": "anonymous",
"methods": [
"get",
"post"
@naamancampbell
naamancampbell / .env_lambda.ps1
Last active January 2, 2018 08:31
Reads PowerShell environment variables file to upload to AWS Lambda
<#
.SYNOPSIS
Reads PowerShell environment variables file to upload to AWS Lambda
.DESCRIPTION
The .env_lambda script is made of the following steps:
1. Skips the first three lines of the .env file
2. Retrieves the contents of each line after the first ":"
3. Joins all variables into a comma-separated string
4. Uploads variables up to AWS Lambda
@naamancampbell
naamancampbell / dashboard.html
Last active October 19, 2019 21:38
Display Multiple Strava Activity Maps in Flask Template
{% for activity in activities %}
<div class="post">
{% if activity.strava_data['map']['polyline'] is not none %}
<div id="map_{{ activity.id }}" class="img-fluid" style="height: 300px;"></div>
{% endif %}
{# other activity data #}
</div>
{% endfor %}
@naamancampbell
naamancampbell / Disable-UAC.ps1
Created October 21, 2017 11:26
Disables UAC without privilege escalation. NB. Must run from another host (mgmt).
##########
## 1. Save file on mgmt host.
## - change 'COMPUTERNAME' to target hostname
##########
Configuration Disable-UAC {
Import-DscResource -ModuleName PsDesiredStateConfiguration
Import-DscResource -ModuleName xSystemSecurity -Name xUac