Skip to content

Instantly share code, notes, and snippets.

View callumgare's full-sized avatar
🦄

Callum Gare callumgare

🦄
View GitHub Profile
@callumgare
callumgare / ecs-container-exec.sh
Last active April 17, 2024 21:00
Creates a shell into an AWS ECS container
#!/usr/bin/env bash
# Enable strict mode
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
usage () {
cat <<EOF
Usage: $(basename "$0") cluster-name [command to execute]
@callumgare
callumgare / private-efs-mount.sh
Last active February 12, 2024 01:10
A script to mount EFS volumes via an ssh bastion host
#!/bin/bash
SSH_PROXY_HOSTHAME=$1
EFS_ID=$2
AWS_REGION=$3
LOCAL_MOUNT_PATH=$4
usage () {
cat <<EOF
Usage: $(basename "$0") [user@]hostname-for-ssh-proxy efs-id aws-region [local-path-to-mount-to]
#!/usr/bin/env node
// This script allows you to forward http requests to a http proxy. There might not seem like much point to
// a proxy to another proxy but requests to a standard http proxy must be in a certain format. Strapi
// doesn't currently support this so we can use this proxy to forward requests in a format that Strapi
// is capable of sending.
// Requests can be made http://localhost:<port used by this script>/<full url include domain of the target page>
// For example if you start this script with the port 8080 and you ultimately want send a request to
// https://www.infoxchange.org/au/about-us you would send the request to
// http://localhost:8080/https://www.infoxchange.org/au/about-us
@callumgare
callumgare / import_file.py
Last active April 18, 2024 10:43 — forked from int-ua/import_file.py
Import management command for django-import-export
# From https://gist.github.com/int-ua/b2bcc4bea8227ab14a437900ff424723
# With a few fixes to get it working for Django 3.2
# (may or may not work for new versions too)
#
# Example usage: python manage.py import_file fixtures/categories.csv \
# --resource_class SearchApp.admin.CategoryResource \
# --model_name SearchApp.models.Category
from __future__ import unicode_literals
import mimetypes
@callumgare
callumgare / Targetprocess Timer Mashup
Last active February 12, 2018 02:19
Adds a timer to a Targetprocess user story so you can clock on, clock off, and have that saved as a time to that user story
/************************************
* Timer Mashup for TargetProcess
* Author: Callum Gare from Melbourne Business Systems
* Contact: callum@mbsystems.com.au
* Requires: The custom fields StartTime and EndTime for the TIME enity
*
* Inserts a Start/Stop Timer button below the title of a UserStory card
* https://i.imgur.com/9PhIeh1.png
************************************/
var apiRoot;
@callumgare
callumgare / keybase.md
Created August 30, 2014 01:09
Keybase Proof

Keybase proof

I hereby claim:

  • I am callumgare on github.
  • I am callumgare (https://keybase.io/callumgare) on keybase.
  • I have a public key whose fingerprint is 3A1F 2366 A994 4F38 620A 5765 CAE6 297B D6F8 EA72

To claim this, I am signing this object: