Skip to content

Instantly share code, notes, and snippets.

View jerryaldrichiii's full-sized avatar
#NoTechForICE

Jerry Aldrich jerryaldrichiii

#NoTechForICE
View GitHub Profile
@jerryaldrichiii
jerryaldrichiii / compose.yaml
Created October 25, 2023 23:46
Postgres + pgadmin + docker compose
version: "3"
services:
postgres:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
var Doom = (function() {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
return (
function(Doom) {
Doom = Doom || {};
var Module=typeof Doom!=="undefined"?Doom:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENV
var Module=typeof Module!=="undefined"?Module:{};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="/build/doom.data";var REMOTE_PACKAGE_BASE="doom.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_
var Module=typeof Module!=="undefined"?Module:{};if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="doom.data";var REMOTE_PACKAGE_BASE="doom.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
"${builtins.fetchGit https://github.com/rycee/home-manager}/nixos"
];
home-manager.users.jerry = {
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
-----> Installing Chef Omnibus (install only if missing)
Downloading package from https://packages.chef.io/files/stable/chef/14.11.21/windows/2016/chef-client-14.11.21-1-x64.msi
Download complete.
Successfully verified C:\Users\azure\AppData\Local\Temp\chef-client-14.11.21-1-x64.msi
Installing Chef Omnibus package C:\Users\azure\AppData\Local\Temp\chef-client-14.11.21-1-x64.msi
$$$$$$ Get-PlatformVersion$env:http_proxy : The term 'Get-PlatformVersion$env:http_proxy' is not recognized as the name of a
$$$$$$ cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
$$$$$$ that the path is correct and try again.
$$$$$$ At C:\windows\temp\winrm-elevated-shell-d5dd57c3-963f-41b1-bc7d-f6f6890ed2bf.ps1:181 char:21
$$$$$$ + $platform_version = Get-PlatformVersion$env:http_proxy = "http://np1p ...

Chef Node Attributes in InSpec

Chef, InSpec, Node Attributes, what are they!?!

Chef and InSpec are open source products made by Chef Software and each fulfill separate needs in their respective problem spaces. That doesn't mean they shouldn't be used together though. Pairing configuration management (Chef) and infrastructure/application testing (InSpec) is a wonderful thing. It is made even more delightful when the same company (and in most cases the same humans) work on the tools to pair them.

That being said, convenience and in some cases developer intuition can lead to unintended and sometimes dangerous consequences. This blog post was created to highlight those consequences.

Chef Node Attributes

control 'kube-1.0' do
title 'CVE-2018-1002105'
impact 1.0
version = command('kubectl version --short').stdout.match(/Server Version: v(.*)/)[1]
case version
when /1.[0-9]\./
describe 'Kube version 1.0.x - 1.9.x' do
it 'should be greater or equal to 1.10.0' do
expect(version).to be >= '1.10.0'