Skip to content

Instantly share code, notes, and snippets.

Avatar

clavery-chef

View GitHub Profile
@clavery-chef
clavery-chef / okta-aws.plugin.zsh
Last active Aug 10, 2020 — forked from irvingpop/okta-aws.plugin.zsh
okta_aws plugin for oh-my-zsh
View okta-aws.plugin.zsh
# shellcheck disable=SC2148
# shellcheck disable=SC2034
# okta-aws plugin for oh-my-zsh
# for use with the bullet-train oh-my-zsh theme: https://github.com/caiogondim/bullet-train.zsh
# (although this could be easily changed)
# Irving Popovetsky <irving@chef.io>
# default profile is used if you don't set one using AWS_PROFILE, which is recommended
OKTA_AWS_DEFAULT_PROFILE="chef-support"
@clavery-chef
clavery-chef / getBlog.js
Last active Apr 2, 2020 — forked from skipjac/getBlog.js
A RSS reader for Zendesk HelpCenter
View getBlog.js
<script>
console.log($('#one').contents());
$(document).ready(function() {
truncate = function(text, length, ellipsis) {
// Set length and ellipsis to defaults if not defined
if (typeof length == 'undefined') var length = 100;
if (typeof ellipsis == 'undefined') var ellipsis = '...';
@clavery-chef
clavery-chef / migration.sh
Created Apr 2, 2020 — forked from jeremymv2/migration.sh
knife-ec-backup examples
View migration.sh
#!/bin/bash
set -e
# Customize all these values
# youre source/destination keys and
# configs will differ
BACKUPDIR="backups"
BACKUPLOG="./migration_backup.log"
RESTORELOG="./migration_restore.log"
@clavery-chef
clavery-chef / a2_reports_api.md
Created Mar 28, 2020 — forked from scottford-io/a2_reports_api.md
Reports API Chef Automate 2
View a2_reports_api.md

Generating Custom Reports from Chef Automate 2.0 compliance API

The following documents how to query the A2 compliance api to pull reports for a given node for a given timeframe

step one: use suggestions or nodes list to get the id of the node

  • this will return a list of suggestions.
  • they will want to search the response data for the node name they requested and then grab the id for the node
curl -H "api-token: admin-token-val" https://a2-url/api/v0/compliance/reporting/suggestions -d '{"type":"node","text":"angrychef-rhel-7-s390x-tester-76dc19.cd.chef.co","filters":[{"type":"start_time","values":["2019-04-02T00:00:00Z"]},{"type":"end_time","values":["2019-04-12T23:59:59Z"]}]}'
You can’t perform that action at this time.