Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| # Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
| if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
| echo "usage: $0 <service_account_name> <namespace>" | |
| exit 1 | |
| fi |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: Cognito Stack | |
| Parameters: | |
| AuthName: | |
| Type: String | |
| Description: Unique Auth Name for Cognito Resources | |
| Resources: | |
| # Creates a role that allows Cognito to send SNS messages | |
| SNSRole: |
| # In your Jenkins job configuration, select "Add build step > Execute shell", and paste this script contents. | |
| # Replace `______your-plugin-name______`, `______your-wp-username______` and `______your-wp-password______` as needed. | |
| # main config | |
| WP_ORG_USER="______your-wp-username______" # your WordPress.org username | |
| WP_ORG_PASS="______your-wp-password______" # your WordPress.org password | |
| PLUGINSLUG="______your-plugin-name______" | |
| CURRENTDIR=`pwd` | |
| MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin |
| #!/bin/bash | |
| name=$RANDOM | |
| url='http://localhost:9093/api/v1/alerts' | |
| echo "firing up alert $name" | |
| # change url o | |
| curl -XPOST $url -d "[{ | |
| \"status\": \"firing\", |
I use this for identifying *.cfn.json and *.cfn.yml files as JSON and YAML format cloudformation templates.
Their filetypes are set to cfn_json and cfn_yaml respectively. I can then have custom highlighting of key attributes
and/or custom snippets set up that are not polluting my editor when I am working with straight javascript/yaml intended
for other purposes. This in on mac os x after installing vim 7.3 along with vim-snipmate and vim-snippets plugins. Someone feel free to improve on this.
au BufRead,BufNewFile *.cfn.json set ft=cfn_json
au BufRead,BufNewFile *.cfn.yml set ft=cfn_yaml
au BufRead,BufNewFile *.cfn.yaml set ft=cfn_yaml| syntax on | |
| set ruler " Show the line and column numbers of the cursor. | |
| set formatoptions+=o " Continue comment marker in new lines. | |
| set textwidth=0 " Hard-wrap long lines as you type them. | |
| set modeline " Enable modeline. | |
| set esckeys " Cursor keys in insert mode. | |
| set linespace=0 " Set line-spacing to minimum. | |
| set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
| " More natural splits | |
| set splitbelow " Horizontal split below current. |
| import base64 | |
| import datetime | |
| import json | |
| import os | |
| import time | |
| import traceback | |
| import urlparse | |
| import botocore.auth | |
| import botocore.awsrequest |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.