Skip to content

Instantly share code, notes, and snippets.

View sneal's full-sized avatar

Shawn Neal sneal

View GitHub Profile
@sneal
sneal / gist:10083310
Created April 8, 2014 02:14
WinRM/GSSAPI - Trace/BPT trap: 5
Process: ruby2.0 [45589]
Path: /opt/local/bin/ruby2.0
Identifier: ruby2.0
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [98807]
User ID: 501
Date/Time: 2014-04-07 17:09:14.000 -0700
OS Version: Mac OS X 10.8.2 (12C3012)
@sneal
sneal / delete TC node and client
Created September 3, 2014 00:53
knife scripts
knife exec -E 'nodes_to_delete = nodes.all.select { |n| n.name.to_s.start_with?("vagrant-%env.USER%-%cookbook_name%") }; clients_to_delete = nodes_to_delete.map { |n| clients.show(n.name) }; nodes_to_delete.each { |n| puts "Deleting node: #{n.name.to_s}"; n.destroy() }; clients_to_delete.each { |c| puts "Deleting client: #{c.name.to_s}"; c.destroy() }'
@sneal
sneal / packer_linux_build.sh
Last active August 29, 2015 14:06
Package Packer on Mac for Linux_amd64
# Sometimes you just need a one off linux build
XC_ARCH=amd64 XC_OS=linux scripts/build.sh
pushd pkg/linux_amd64
zip 0.7.1.dev_linux_amd64.zip *
shasum -a 256 0.7.1.dev_linux_amd64.zip
popd
$is_64bit = [IntPtr]::size -eq 8
# setup openssh
$ssh_download_url = "http://www.mls-software.com/files/setupssh-6.3p1-1.exe"
if ($is_64bit) {
Write-Host "64 bit OS found"
$ssh_download_url = "http://www.mls-software.com/files/setupssh-6.3p1-1(x64).exe"
}
If (!(Test-Path "C:\Program Files\OpenSSH\bin\ssh.exe")) {
package main
import (
"os"
"fmt"
"code.google.com/p/go.crypto/ssh"
)
type password string
@sneal
sneal / gist:8064758
Created December 21, 2013 02:47
Packer issue 738 debug log from Ubuntu 12.04 run I added a log message that prints out the result of the NextId function `Found NextId of: 562`
This file has been truncated, but you can view the full file.
Last login: Fri Dec 20 16:12:53 on ttys008
[~/src/daptiv-windows-boxes/daptiv_site_sso/win2k8r2sp1_standard (master)]$ cd ../..
[~/src/daptiv-windows-boxes (master)]$ cd ..
[~/src]$ cd basebox-packer
[~/src/basebox-packer (master)]$ ls
Makefile README.md template virtualbox vmware
[~/src/basebox-packer (master)]$ cd vmware
[~/src/basebox-packer/vmware (master)]$ ls
[~/src/basebox-packer/vmware (master)]$ cd ..
[~/src/basebox-packer (master)]$ cd template/
@sneal
sneal / configvalueencrypt.md
Created August 24, 2016 15:57
How to encrypt a config value to store in a config repo

Encrypting config values for SCS

Since the encrypt/decrypt endpoints on the config server are disabled (we're using client side decryption), the easiest way is to use the Spring CLI to encrypt config values.

Install Spring Cloud CLI

Install the Spring CLI. You can also use SdkMan formerly GVM to install. Important, make sure you use the older 1.3.6.RELEASE of Spring CLI, otherwise you'll run into this issue.

Install the Spring Cloud CLI:

$ spring install org.springframework.cloud:spring-cloud-cli:1.2.0.BUILD-SNAPSHOT
@sneal
sneal / transform.rb
Created March 26, 2018 17:15
credhub dump to bulk import yaml
require 'yaml'
y = []
File.open("export.txt", "r") do |f|
section = ''
f.each_line do |line|
if line.strip.empty? && !section.empty?
y << YAML.load(section).tap { |h| h.delete('id'); h.delete('version_created_at') }
section = ''
else
@sneal
sneal / terraform_opsman_apply.log
Created April 6, 2018 22:28
Terraform opsman provider - upgrade opsman output
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
@sneal
sneal / config-net.ps1
Last active September 26, 2018 22:52
Install SQL Server Core 2017
New-NetIPAddress -InterfaceIndex 4 -IPAddress 10.193.135.0 -PrefixLength 24 -DefaultGateway 10.193.135.1
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ("10.193.135.90", "10.193.135.2", "1.1.1.1")