This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Output of Terraform for informational purpose for a bug report. Otherwise useless. | |
azurerm_storage_account.monitoring: Creating... | |
azurerm_storage_account.monitoring: Still creating... [10s elapsed] | |
azurerm_storage_account.monitoring: Still creating... [20s elapsed] | |
< snip > | |
azurerm_storage_account.monitoring: Still creating... [9m48s elapsed] | |
azurerm_storage_account.monitoring: Still creating... [9m58s elapsed] | |
azurerm_storage_account.monitoring: Creation complete after 10m7s [id=/subscriptions/<redacted>/resourceGroups/u<redacted>n/providers/Microsoft.Storage/storageAccounts/<redacted>] | |
azurerm_storage_share.mpowcoremon_fileshare: Creating... | |
azurerm_storage_container.monitoring: Creating... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
# | |
# What does this script do? | |
# This script will clone ( or pull existing ) ALL of the repos you have access to in GitLab. | |
# This script does not pull other peoples/entities repos. | |
# | |
# INSTRUCTIONS FOR USE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on MacBook Pro - Mac OS Mohave 10.14.2 | |
# List all repos in a users GitHub Account | |
curl -si https://api.github.com/users/terraform-aws-modules/repos | grep ssh_url | cut -d '"' -f4 | |
# Clone all repos in a users GitHub Account | |
curl -si https://api.github.com/users/## GITHUB USER ##/repos | grep ssh_url | cut -d '"' -f4 | xargs -I{} git clone {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mixed list of array(list) and integer | |
mixed=[ 'a', [1],2,[3], ['B'] ] | |
# function to extract value(s) from a list which may contain lists of integers | |
def flattenMixedList( mixed ): | |
for item in mixed: | |
if isinstance(item, list): | |
for thisItem in item: yield thisItem | |
else: | |
yield item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir group_vars host_vars plugins library roles/role{1..3}/{tasks,templates,handlers,files,vars,defaults,meta} -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alias | |
.bashrc | |
alias messagelog = “tail -f /var/log/messages” | |
export MYNAME =”Steven” | |
environment variables | |
$ export CUSTOM_LOG=”/custom/log/” ← to set a variable from command line | |
$ echo $CUSTOM_LOG ← to obtain settings | |
$ echo “MY log message” > $CUSTOM_LOG/mylog.txt ← place content in file | |
$ unset CUSTOM_LOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Screen | |
Ctrl+a c – Create new Screeen | |
Ctrl+a 0-9 – Switch between screens | |
Ctrl+a n – Switch to next screen | |
Ctrl+a k – Kill current screen | |
Ctrl+a A – Set a title | |
Ctrl+a d – Detach | |
Ctrl+a ? – Help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Which and Whereis locate man pages and locations of binary files for a specific program. | |
$ which pwd | |
$ whereis pwd | |
Locate uses database that needs updated (by cron) | |
$ locate pwd | |
$ updatedb ← updates locate database | |
$ locate kernel | grep /usr ← find “kernel” in path or file name within the /usr folder | |
Find |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# architecture | |
lscpu | |
# release | |
# RHEL, CentOS | |
cat /etc/redhat-release | |
# Ubuntu | |
cat /etc/issue | |
lsb_release -a |