##This file is separate by individuals commands below, using it's you're know what GNU/Linux you're running
$ cat /etc/[A-Za-z]*[_-][rv]e[lr]*
$ cat /etc/issue
$ lsb_release -a
$ uname -a
##This file is separate by individuals commands below, using it's you're know what GNU/Linux you're running
$ cat /etc/[A-Za-z]*[_-][rv]e[lr]*
$ cat /etc/issue
$ lsb_release -a
$ uname -a
description: Admin project level access control. Applies to resources within a specific project. | |
context: | |
project: 'MyProjectName' # all projects | |
for: | |
resource: | |
- equals: | |
kind: job | |
allow: [run] # allow create jobs | |
- equals: | |
kind: node |
description: Developer project level access control. Applies to resources within a specific project. | |
context: | |
project: 'Your Project Name here' # all projects | |
for: | |
job: | |
- allow: [read] # allow read of all jobs | |
- match: | |
group: 'HML/*' | |
allow: [read,run] # allow run access for jobs within the "HML" top level group |
#!/usr/bin/python | |
import os | |
import sys | |
import boto3 | |
ec2 = boto3.resource('ec2') | |
sgs = list(ec2.security_groups.all()) | |
insts = list(ec2.instances.all()) |
FROM ubuntu | |
LABEL Description="A simple network toolkit like a Swiss Army Knife" | |
RUN apt update && apt install -y curl \ | |
nmap \ | |
netcat \ | |
mtr \ | |
net-tools \ | |
telnet \ |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ubuntu-deployment | |
labels: | |
app: ubuntu | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
# Importing a Route53 Record | |
$ terragrunt import aws_route53_record.record HOSTZONEIDXXXXXXX_my-record.my-domaym_CNAME | |
# Generate a Random String | |
$ cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1 | |
# Turns your `git log` more Pretty | |
$ git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
## Examples of use | |
git lg |
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
#!/bin/sh | |
customer_managed_policy_arns=`aws iam list-policies --scope Local --query 'Policies[*].Arn' --output text` | |
for arn in $customer_managed_policy_arns; do | |
echo aws iam delete-policy --policy-arn "$arn" #To delete re-run without "echo" | |
done |
#!/bin/bash | |
for i in $(aws cloudformation list-stacks |jq -r '.StackSummaries[] | {StackName} | join(" ")') | |
do echo aws cloudformation delete-stack --stack-name $i #remove echo to delete | |
done | |