Skip to content

Instantly share code, notes, and snippets.

View dholdaway's full-sized avatar

Darren Holdaway dholdaway

View GitHub Profile
@dholdaway
dholdaway / install_docker.sh
Created August 2, 2023 16:17
install docker Ubuntu 22.04
#!/bin/bash
# Update the package list
sudo apt-get update
# Install necessary packages
sudo apt-get install ca-certificates curl gnupg
# Create a directory for the keyring
sudo install -m 0755 -d /etc/apt/keyrings
@dholdaway
dholdaway / LightFlickerEffect.cs
Created July 13, 2021 22:10 — forked from sinbad/LightFlickerEffect.cs
Unity simple & fast light flicker script
using UnityEngine;
using System.Collections.Generic;
// Written by Steve Streeting 2017
// License: CC0 Public Domain http://creativecommons.org/publicdomain/zero/1.0/
/// <summary>
/// Component which will flicker a linked light while active by changing its
/// intensity between the min and max values given. The flickering can be
/// sharp or smoothed depending on the value of the smoothing parameter.
@dholdaway
dholdaway / install virtualenv ubuntu 16.04.md
Created October 28, 2019 11:22 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 

Keybase proof

I hereby claim:

  • I am dholdaway on github.
  • I am dholdaway (https://keybase.io/dholdaway) on keybase.
  • I have a public key ASAibVvZBeFVDhlqS_DaiHPSjU8ktb60qJ0dTn0P3XeaJAo

To claim this, I am signing this object:

@dholdaway
dholdaway / nginx.conf
Created July 18, 2019 19:45 — forked from shortjared/nginx.conf
AWS API Gateway Nginx Reverse Proxy
# NOTE
#
#
# Use sed on the instance up to replace the INSTANCE_ID and DNS_RESOLVER with the following commands
#
####################################################################################################
# Fetch the private IP for resolving DNS dynamically in nginx
# We also need to escape the `.` from it for usage in later sed
#
# DNS_RESOLVER=`grep nameserver /etc/resolv.conf | cut -d " " -f2 | sed 's/\./\\./g'`
@dholdaway
dholdaway / gist:8aacb454e6229defa8d6b7cd1e71d04a
Created March 21, 2019 00:41 — forked from carlosedp/gist:4df3cd58a489a3c4022f97a474439b90
Rock64 Install (Adjust IPs/Hostnames/DNS to your deployment)
# Rock64 Install (Adjust IPs/Hostnames/DNS to your deployment)
Disable NetworkManager and DHCP Client
sudo systemctl stop dhcpcd
sudo systemctl stop NetworkManager
sudo systemctl disable dhcpcd
sudo systemctl disable NetworkManager
sudo systemctl daemon-reload
@dholdaway
dholdaway / install_container_service.sh
Created March 21, 2019 00:40 — forked from carlosedp/install_container_service.sh
Install Container services (Docker/Kubernetes) on Debian/Ubuntu
#!/bin/bash
echo "Container Linux installation script"
echo "This will install:"
echo " - Docker Community Edition"
echo " - Docker Compose"
echo " - Kubernetes: kubeadm, kubelet and kubectl"
echo ""
set -xeo pipefail
@dholdaway
dholdaway / ssh_securitygroup.tf
Created August 30, 2018 20:50
add my ip address to AWS security group
provider "aws" {
region = "eu-west-1"
}
data "http" "ip" {
url = "http://icanhazip.com"
}
resource "aws_security_group" "ssh" {
name = "ssh"
@dholdaway
dholdaway / docker-swarm-ports.md
Created August 9, 2018 13:51 — forked from BretFisher/docker-swarm-ports.md
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

@dholdaway
dholdaway / build-tag-push.py
Created August 1, 2018 10:25 — forked from peatiscoding/build-tag-push.py
a script to convert your docker-compose.yml (version 2) with build node to image node; this script required DOCKERHUB_USER environment available.
#!/usr/bin/python
import os
import subprocess
import time
import yaml
import re
user_name = os.environ.get("DOCKERHUB_USER")