first, enter chef-shell:
$ chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading.........done.
This is the chef-shell.
Chef Version: 14.3.37
import requests | |
# Your LEGACY Slack API token | |
SLACK_API_TOKEN = "xoxp-my-slack-legacy-token" | |
def get_channel_list(): | |
""" | |
Retrieves a list of available channels using the Slack API. | |
""" | |
url = "https://slack.com/api/conversations.list" |
#!/usr/bin/env python3 | |
# usage: hny-column-cleanup.py [-h] -k API_KEY -d DATASET [-m {hidden,spammy}] | |
# Honeycomb Dataset Column Cleanup tool | |
# arguments: | |
# -h, --help show this help message and exit | |
# -k API_KEY, --api-key API_KEY | |
# Honeycomb API key | |
# -d DATASET, --dataset DATASET | |
# Honeycomb Dataset |
first, enter chef-shell:
$ chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading.........done.
This is the chef-shell.
Chef Version: 14.3.37
# 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-engineering" |
Configuration ContainerHostDsc | |
{ | |
# Set up general parameters used to determine paths where Docker will | |
# be installed to and downloaded from. | |
$ProgramFiles = $ENV:ProgramFiles | |
$DockerPath = Join-Path -Path $ProgramFiles -ChildPath 'Docker' | |
$DockerZipFileName = 'docker.zip' | |
$DockerZipPath = Join-Path -Path $ProgramFiles -ChildPath $DockerZipFilename | |
$DockerUri = 'https://download.docker.com/components/engine/windows-server/cs-1.12/docker.zip' |
sudo: required | |
dist: trusty | |
services: docker | |
language: bash | |
install: | |
- 'curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash' | |
branches: | |
only: |
Example output:
root@chef:~# ./chef_server_nodes_report.rb -h
Usage: chef_server_nodes_report.rb [options]
-g, --group-by TYPE Group results by: ["version", "org", "environment", "check_in_month", "check_in_date", "platform_family", "platform_version", "platform", "os"]
root@chef:~# ./chef_server_nodes_report.rb --group-by version
loading config from /etc/opscode
{
#!/bin/bash -ex | |
# Quickly launch and preconfigure a Windows 1803 dev machine in AWS with spot pricing, from your mac | |
usage=' | |
launch_ec2_windows_spot.sh --username irving --password Cod3Can! --ssh-key irving --subnet subnet-7fd06308 --security-group-id sg-8a0f82f5 | |
NOTE: Due to a weird assumption in the UserData script, the password must be exactly 8 characters long and meet complexity requirements | |
NOTE2: Create a SECURITY_GROUP_ID that allows port 3389 from your IP address | |
NOTE3: Install Microsoft Remote Desktop 10 from the app store ( https://itunes.apple.com/us/app/microsoft-remote-desktop-10/id1295203466?mt=12 ) | |
' |
MY_INSTANCEID | |
MY_SERVER | |
user-data.txt | |
.zshrc | |
.gitconfig | |
.ssh | |
.byobu | |
.oh-my-zsh |
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use: | |
# "${data.external.ssh_key_generator.result.public_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key}" (contents) | |
# "${data.external.ssh_key_generator.result.private_key_file}" (path) | |
data "external" "ssh_key_generator" { | |
program = ["bash", "${path.root}/../ssh_key_generator.sh"] | |
query = { | |
customer_name = "${var.customer_name}" | |
customer_group = "${var.customer_group}" |