Skip to content

Instantly share code, notes, and snippets.

View jasonwbarnett's full-sized avatar

Jason Barnett jasonwbarnett

View GitHub Profile
@jasonwbarnett
jasonwbarnett / package.json
Last active March 14, 2024 18:11
pants info
{
"name": "app-name",
"private": true,
"scripts": {
"dev": "react-env && next dev",
"build": "next build",
"start": "next start",
"test": "TZ=utc jest --silent",
"test:verbose": "TZ=utc jest",
"test:watch": "TZ=utc jest --watch",
tap "databricks/tap"
tap "go-task/tap"
tap "homebrew/bundle"
brew "ack"
brew "readline"
brew "xz"
brew "ansible"
brew "autoconf"
brew "automake"
brew "awscli"
Policyfile.rb - Describe how you want Chef Infra Client to build your system.
#
# For more information on the Policyfile feature, visit
# https://docs.chef.io/policyfile/
# A name that describes what the system you're building with Chef does.
name 'testd'
# Where to find external cookbooks:
default_source :chef_server, "https://api.chef.io/organizations/wschef"
@jasonwbarnett
jasonwbarnett / README.md
Last active December 11, 2021 01:03
Mitigate log4j vulnerability for Chef Infra Server without upgrading

Overview

Chef Progress has already begun working on a fix that will be released in the next Chef Infra Server release, see: chef/chef-server#2992

If for some reason you can't upgrade soon here is an alternative. I highly recommend upgrading instead of using this fix. This fix is meant to be a stop gap solution.

Alternative Fix

This only works if you're using a version of Chef Infra Server that ships with elasticsearch. If you're using an old version of Chef Infra Server that is still using solr this won't work.

@jasonwbarnett
jasonwbarnett / karabiner_cmd_to_ctrl.json
Created June 14, 2021 13:41
This maps the command key to control while using RDP
{
"title": "Remote Desktop",
"rules": [
{
"description": "Swap command and control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
diff --git a/lib/kitchen/driver/azure_credentials.rb b/lib/kitchen/driver/azure_credentials.rb
index 0d38784..4def42c 100644
--- a/lib/kitchen/driver/azure_credentials.rb
+++ b/lib/kitchen/driver/azure_credentials.rb
@@ -28,7 +28,7 @@ module Kitchen
if File.file?(config_file)
@credentials = IniFile.load(File.expand_path(config_file))
else
- warn "#{CONFIG_PATH} was not found or not accessible."
+ warn "#{CONFIG_PATH} was not found or not accessible. Will use environment variables or MSI."
yum shell -y <<eof
remove chefdk
reinstall chef
transaction solve
transaction run
eof
diff --git /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vcenter-2.6.0/lib/support/clone_vm.rb /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vcenter-2.6.0/lib/support/clone_vm.rb
index d73c4cc..e672f0a 100644
--- /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vcenter-2.6.0/lib/support/clone_vm.rb
+++ /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/kitchen-vcenter-2.6.0/lib/support/clone_vm.rb
@@ -395,15 +395,34 @@ class Support
options[:clone_type] == :full
end
+ def root_folder
+ vim.serviceInstance.content.rootFolder
# el7-options.cfg
# Commands and Options.
###############################################################################
# Required options:
# See the kickstart section of the install docs for this distro for more details
# authconfig
# bootloader
# keyboard
# lang
# part or partition