Skip to content

Instantly share code, notes, and snippets.

View strongjz's full-sized avatar

James Strong strongjz

View GitHub Profile
@strongjz
strongjz / Makefile
Created November 1, 2023 22:04 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@strongjz
strongjz / taint_module.sh
Created April 20, 2022 19:34 — forked from justinclayton/taint_module.sh
Terraform: taint all resources from one module
#!/bin/bash
module=$1
for resource in `terraform show -module-depth=1 | grep module.${module} | tr -d ':' | sed -e 's/module.${module}.//'`; do
terraform taint -module ${module} ${resource}
done
@strongjz
strongjz / docker-credentials.sh
Created September 4, 2020 19:19 — forked from piersharding/docker-credentials.sh
Create Docker config.json file credentials
#!/bin/bash
# This script creates a docker config.json file with the auth section
# as an example of what can be passed into GitLab-CI and used in
# conjunction with DOCKER_CONFIG - the config file directory location.
# command line parameter default values
DOCKER_REGISTRY=""
DOCKER_USER=""
DOCKER_PASSWORD=""
@strongjz
strongjz / git-ssh-auth-win-setup.md
Created November 5, 2018 17:04 — forked from bsara/git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@strongjz
strongjz / install_jenkins_plugin.sh
Created August 6, 2017 22:11 — forked from micw/install_jenkins_plugin.sh
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@strongjz
strongjz / zookeeper-solr-cloud.md
Created May 24, 2017 20:23 — forked from kalharbi/zookeeper-solr-cloud.md
Setting up an external Zookeeper Solr Cluster

Setting up an external Zookeeper Solr Cluster

This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine. This was tested on Solr version 5.4.1 and Zookeeper version 3.4.6

Installing Solr and Zookeeper

  • Download and extract Solr:
    • curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
    • mkdir /opt/solr
@strongjz
strongjz / README.md
Created May 22, 2017 17:53 — forked from magnetikonline/README.md
AWS Elastic Beanstalk deploy user restricted IAM policy.

AWS Elastic Beanstalk deploy user restricted IAM policy

An IAM user policy document to give minimal rights for deploying an Elastic Beanstalk application.

Where:

  • REGION: AWS region.
  • ACCOUNT_ID: AWS account ID.
  • APPLICATION_NAME: Desired target Elastic Beanstalk application name(space).
  • IAM_INSTANCE_PROFILE_ROLE: The instance profile (IAM role) Elastic Beanstalk EC2 instaces will run under.
#!/bin/bash
# Use whichever region you're working in
export AWS_DEFAULT_REGION=eu-west-1
# Make ec2-user's home dir the install to make it easier to navigate when subsequently ssh-ing in to instances
su ec2-user -
cd /home/ec2-user
echo Working dir is `pwd`
@strongjz
strongjz / pie.coffee
Last active August 29, 2015 14:08 — forked from stevenleeg/pie.coffee
class Dashing.Pie extends Dashing.Widget
@accessor 'value'
onData: (data) ->
@render(data.value)
render: (data) ->
if(!data)
data = @get("value")
if(!data)