Skip to content

Instantly share code, notes, and snippets.

View justdan96's full-sized avatar

Dan justdan96

  • London, UK
View GitHub Profile
@justdan96
justdan96 / obi-w00t.zsh-theme
Last active May 2, 2024 16:13
Personal Oh-My-Zsh Theme
# Obi-w00t's theme, based on Michele Bologna's theme
# https://www.michelebologna.net
#
# The main changes are:
# * hostname is now always red
# * git prompt now uses vcs_info, and has just the following prompt chars:
# ~ = untracked changes
# + = staged changes
# * = unstaged changed
# ± = local branch is behind or ahead of remote
@justdan96
justdan96 / const.go
Created November 11, 2023 12:29
PixelUI
package main
// Property - GUI property
type Property int32
// GUI properties enumeration
const (
GlobalBaseColor Property = iota
GlobalBorderColor
GlobalTextColor
#!/bin/bash
set -e
function append_newline {
if [[ -z "$(tail -c 1 "$1")" ]]; then
:
else
echo >> "$1"
fi
@justdan96
justdan96 / terraform_ntlm_error.log
Created April 10, 2018 21:20
Terraform NTLM Debug Log
null_resource.remoting: Provisioning with 'remote-exec'...
null_resource.remoting (remote-exec): Connecting to remote host via WinRM...
null_resource.remoting (remote-exec): Host: MYSERVERWEB0192.mydomain.mycompancorp.com
null_resource.remoting (remote-exec): Port: 5985
null_resource.remoting (remote-exec): User: The.User.Name
null_resource.remoting (remote-exec): Password: true
null_resource.remoting (remote-exec): HTTPS: false
null_resource.remoting (remote-exec): Insecure: true
null_resource.remoting (remote-exec): NTLM: true
null_resource.remoting (remote-exec):2018-04-10T12:41:40.596+0100 [DEBUG] plugin.terraformb.exe: remote-exec-provisioner (internal) 2018/04/10 12:41:40 [ERROR] error creating shell: http response error: 401 - invalid content type
@justdan96
justdan96 / winrm_ntlm.patch
Last active November 14, 2017 18:21
patch for Terraform to add a new "Negotiate" parameter to the WinRM communicator, to allow NTLM authentication
diff --git communicator/winrm/communicator.go communicator/winrm/communicator.go
index c25c2bc63..78b528fb7 100644
--- communicator/winrm/communicator.go
+++ communicator/winrm/communicator.go
@@ -5,6 +5,7 @@ import (
"io"
"log"
"math/rand"
+ "net/http"
"strconv"