Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| import boto3 | |
| # you can assign role in the function like below | |
| # ROLE_ARN = 'arn:aws:iam::01234567890:role/my_role' | |
| # | |
| # or you can pass role as an evironment varibale | |
| # ROLE_ARN = os.environ['role_arn'] | |
| ROLE_ARN = = os.environ['role_arn'] |
| while read r; do | |
| echo $r | |
| aws codecommit delete-repository --repository-name $r --region us-east-1 | |
| done < ~/dev/utility-scripts/aws/codecommit/repos.txt |
| "UserData": { | |
| "Fn::Base64": { "Fn::Join":["", [ | |
| "#!/bin/bash -ex\n", | |
| "apt-get update\n", | |
| "apt-get -y install python-setuptools\n", | |
| "mkdir aws-cfn-bootstrap-latest\n", | |
| "curl https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz | tar xz -C aws-cfn-bootstrap-latest --strip-components 1\n", | |
| "easy_install aws-cfn-bootstrap-latest\n", | |
| "/usr/local/bin/cfn-init --stack ", { "Ref":"AWS::StackName" }, " --resource WebServer", " --region ", { "Ref": "AWS::Region" }, "\n", | |
| "\n", |
| #!/bin/bash | |
| # Options: | |
| PASSWORD="mysecret" | |
| DISPLAY=":10" | |
| VNCSERVER_OPTIONS="-geometry 1024x768 -alwaysshared" | |
| PASSWD_PATH="$HOME/.vnc/passwd" | |
| XSTARTUP_PATH="$HOME/.vnc/xstartup" | |
| VNCSERVER="tightvncserver" | |
| VNCPASSWD="tightvncpasswd" |
| dash_id=xxxx | |
| api_key=xxx | |
| app_key=xxx | |
| # 1. export | |
| curl -X GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${api_key}&application_key=${app_key}" > dash.json | |
| # 2. edit dash.json | |
| move "graphs", "title", "description" up one level in the json hierarchy, from being beneath "dash" to being at the same level |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-nameservice.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefixservice.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)| --- | |
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: "Create a Lambda function that will take a comma seperated list of key=value pairs and return an array of key value pairs that can then be used in cloudformation tags resource parameter" | |
| Resources: | |
| LambdaExecutionRole: | |
| Type: AWS::IAM::Role | |
| Properties: | |
| ManagedPolicyArns: | |
| - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole |
| version: 0.1 | |
| phases: | |
| install: | |
| commands: | |
| - apt-get update | |
| - apt-get install nodejs -y | |
| - gem install bundler | |
| - gem install middleman | |
| pre_build: | |
| commands: |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": "s3:ListAllMyBuckets", | |
| "Resource": "arn:aws:s3:::MyBucketName" | |
| }, | |
| { | |
| "Action": [ |