Skip to content

Instantly share code, notes, and snippets.

View phillhocking's full-sized avatar

Phillip Andrew Hocking phillhocking

View GitHub Profile
@phillhocking
phillhocking / gist:d6cc563ebeb56641c2946ed851c7f4e6
Created August 28, 2019 03:01
Terraform Toubleshooting 1
Error: Invalid value for module argument
on main.tf line 8, in module "ghost-db":
8: security_groups = aws_security_group.ghost-db.id
The given value is not suitable for child module variable "security_groups"
defined at ghost-database/variables.tf:17,1-27: list of string required.
Error: Invalid value for module argument
@phillhocking
phillhocking / main.tf
Created September 1, 2019 03:58
Terraform Troubleshooting 3
resource "aws_instance" "ghost" {
ami = "${data.aws_ami.ubuntu.id}"
instance_type = "t2.small"
key_name = "${var.key_pair_name}"
vpc_security_group_ids = "${var.security_groups}"
tags = {
Name = "ghost-server"
}
@phillhocking
phillhocking / .tmux.conf.local
Last active September 3, 2019 02:33
FreeBSD tmux.conf.local for https://github.com/gpakosz/.tmux
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
@phillhocking
phillhocking / variables.tf
Created September 25, 2019 07:36
Example variables.tf
# AWS Config
variable "aws_access_key" {
default = "YOUR_ACCESS_KEY_ID"
}
variable "aws_secret_key" {
default = "YOUR_SECRET_KEY"
}
variable "aws_region" {
@phillhocking
phillhocking / ghost
Created October 3, 2019 03:45
Config file isn't being transformed by ghost-server/template_files.tf
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
client_max_body_size 1G;
location / {
proxy_pass http://localhost:2368;
@phillhocking
phillhocking / gist:c9fb9f1b8f42aaf18b52c784d6907b5b
Created November 6, 2019 00:09
Troubleshooting system-config-kickstart on Ubuntu 18.04.03
root@ubuntu-workspace:/opt/ubuntuiso# system-config-kickstart
No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
/usr/share/system-config-kickstart/kickstartGui.py:77: Warning: invalid (NULL) pointer instance
xml = gtk.glade.XML ("/usr/share/system-config-kickstart/system-config-kickstart.glade", domain=domain)
/usr/share/system-config-kickstart/kickstartGui.py:77: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
xml = gtk.glade.XML ("/usr/share/system-config-kickstart/system-config-kickstart.glade", domain=domain)
/usr/share/system-config-kickstart/kickstartGui.py:77: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
xml = gtk.glade.XML ("/usr/share/system-config-kickstart/system-config-kickstart.glade", domain=domain)
@phillhocking
phillhocking / unifi.ks
Created December 5, 2019 17:36
Unifi 18.04.03 Kickstart
platform=AMD64
#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
@phillhocking
phillhocking / unifi-18.04-install
Last active December 9, 2019 07:02
Automating Ubiquiti Unifi installation on 18.04.03
#!/bin/bash
# Check for root and instruct for sudo
if [[ "$EUID" -ne 0 ]]; then
clear
clear
echo "#########################################################################"
echo "#"
echo "# This script needs to be run as root - su or sudo"
echo "#"

Gratitude

I just sent this message to Guy Kawasaki on Facebook and figured that he never would see or read it, but I figured it would make sense to write a short blog about the impact this simple thing had on my life.

Hey Guy, I know you probably don't remember me from back in the Google+ days or really know me at all, but I just wanted to reach out and say that you completely changed my life. You made a presentation at Stanford in 2004 and I think I first saw this clip in 2008-2009 and it really resonated with me I must have watched it a thousand times. It's titled Make Meaning.

>I had a really rough row to hoe for a minute with behavioral health issues that led to me being a homeless drug addict, but taking the lessons I learned from the short Stanford video (even though I really like the whole presentation, that single nugget stayed with me) and the Brené Brown TED talk together

@phillhocking
phillhocking / bootstrap2019DC.ps1
Last active July 4, 2023 16:34
Microsoft Windows Server 2019 Standard - Golden Image
# provision2019DC.ps1
# Flat Server 2019 1909.4 install to use in creating other 2019 images with Boxstarter
# 1.3 - 5/3/2020
# Author: Phillip Hocking phillhocking@gmail.com
#
# Purpose: This script provisions a base install Microsoft Windows Server 2019 VM Gen 2 Hyper-V instance for the purpose
# of further configuring as a PDC (Primary Domain Controller) or AAD DS (Azure Active Directory Domain Services) connector.
#
# Caveats: When the Hyper-V bootloader comes up it will say that boot timed out because the amount of time it takes for the
# Hyper-V connection terminal to connect is longer than the amount of time it gives to you 'press any key to install from cd'