Skip to content

Commit d6acc76

Browse files
committed
clean up
1 parent 693a03b commit d6acc76

File tree

5 files changed

+52
-52
lines changed

5 files changed

+52
-52
lines changed

Diff for: aws.sh

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#AWS CLI commands
22

3-
aws config #configures aws cli
4-
aws configure list #list all configuration data
5-
aws configure list-profiles #list all profile names
6-
aws s3 ls #list s3 buckets
7-
aws s3 ls s3://<bucket-name> #list bucket content
8-
aws s3 mb s3://<bucket-name> #create a bucket
9-
aws s3 rb s3://<bucket-name> #remove empty bucket
10-
aws s3 sync <Local> s3://<bucket-name> #sync objects
11-
aws s3 cp <object> s3://<bucket-name> #copy to a bucket
3+
aws config #configures aws cli
4+
aws configure list #list all configuration data
5+
aws configure list-profiles #list all profile names
6+
aws s3 ls #list s3 buckets
7+
aws s3 ls s3://<bucket-name> #list bucket content
8+
aws s3 mb s3://<bucket-name> #create a bucket
9+
aws s3 rb s3://<bucket-name> #remove empty bucket
10+
aws s3 sync <Local> s3://<bucket-name> #sync objects
11+
aws s3 cp <object> s3://<bucket-name> #copy to a bucket
1212
aws s3 cp s3://<bucket-name>/<object><destination> #copy from bucket
13-
aws s3 mv s3://<bucket-name>/<object><destination> #move object
14-
aws s3 rm s3://<bucket-name><object> #remove objcet
15-
aws s3 sync <Local> s3://<bucket> #sync objects between buckets/directories
13+
aws s3 mv s3://<bucket-name>/<object><destination> #move object
14+
aws s3 rm s3://<bucket-name><object> #remove objcet
15+
aws s3 sync <Local> s3://<bucket> #sync objects between buckets/directories
1616

1717

1818

Diff for: bash.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ls -al #Shows long listing of directory contents including hidden files
4040
ls -t #Sort by last modified
4141
ls -S #Sort by file size
4242
ls -1 #One file per line
43-
ls -m #Comma-­sep­arated output
43+
ls -m #Comma-­sep­arated output
4444

4545
######################
4646
#Shortcuts
@@ -92,7 +92,7 @@ kill <pid> #Kill process with id pid
9292
kill -9 <pid> #Generates a SIGKILL - doesn't check the state of the process and kills the process immediately
9393
pkill <name> #Kill process with name name
9494
killall <name> #Kill all processes with names beginning name
95-
ps aux | grep <processes> #Output running <processes>
95+
ps aux | grep <processes> #Output running <processes>
9696
lsof -i TCP:8000 | grep LISTEN #Searches for a processes running on a specified port
9797

9898
######################
@@ -105,6 +105,6 @@ ssh <username>@<host> #SSH connection to host with username
105105
######################
106106
#File Permis­sions
107107
######################
108-
chmod 775 <file> #Change mode of file to 775
109-
chmod -R 600 <dir> #Change permissions of dir and its contents to 600
108+
chmod 775 <file> #Change mode of file to 775
109+
chmod -R 600 <dir> #Change permissions of dir and its contents to 600
110110
chown <user>:<group> <file> #Change ownership of file to user and group - add -R to include a dir's contents

Diff for: docker.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ docker image rm alpine:3.4 #Delete an image from the local image store
1515
#######
1616
#Share
1717
#######
18-
docker pull myimage:1.0 #Pull an image from a registry
19-
docker tag myimage:1.0 myrepo/myimage:2.0 #Retag a local image with a new image name and tag
20-
docker push myrepo/myimage:2.0 #Push an image to a registry
18+
docker pull myimage:1.0 #Pull an image from a registry
19+
docker tag myimage:1.0 myrepo/myimage:2.0 #Retag a local image with a new image name and tag
20+
docker push myrepo/myimage:2.0 #Push an image to a registry
2121

2222
#######
2323
#Run
@@ -27,16 +27,16 @@ docker container run --name <name> -p 5000:80 alpine:3.9
2727
#image, name the running container
2828
#“web” and expose port 5000 externally,
2929
#mapped to port 80 inside the container.
30-
docker container stop <name> #Stop a running container through SIGTERM
31-
docker container kill <name> #Stop a running container through SIGKILL
32-
docker network ls #List the networks
33-
docker container ls #List the running containers (add --all to include stopped containers)
30+
docker container stop <name> #Stop a running container through SIGTERM
31+
docker container kill <name> #Stop a running container through SIGKILL
32+
docker network ls #List the networks
33+
docker container ls #List the running containers (add --all to include stopped containers)
3434
docker container rm -f $(docker ps -aq) #Delete all running and stopped containers
35-
docker container logs --tail 100 <name> #Print the last 100 lines of a container’s logs
36-
docker <command> --help #For more information on a particular command
37-
docker container top <name> #List processes running in a container
35+
docker container logs --tail 100 <name> #Print the last 100 lines of a container’s logs
36+
docker <command> --help #For more information on a particular command
37+
docker container top <name> #List processes running in a container
3838
docker container insepct <name>
39-
docker container stats <name> #Shows performance stats
39+
docker container stats <name> #Shows performance stats
4040

4141
#######
4242
#Docker Management

Diff for: git.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ git status #Shows which files are in the staging area/worki
1010
######################
1111
#Configure Tooling
1212
######################
13-
git config --global user.name "[name]" #Sets the name you want attached to your commit transactions
13+
git config --global user.name "[name]" #Sets the name you want attached to your commit transactions
1414
git config --global user.email "[email address]" #Sets the email you want attached to your commit transactions
15-
git config --global color.ui auto #Enables helpful colorization of command line output
15+
git config --global color.ui auto #Enables helpful colorization of command line output
1616

1717
######################
1818
#Branches

Diff for: terraform.sh

+23-23
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ terraform plan #Scans all *.tf files in your dir an
5757
########
5858
#apply and refresh
5959
########
60-
terraform apply #Applies execution plan and builds the stack
61-
terraform refresh #Used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure.
60+
terraform apply #Applies execution plan and builds the stack
61+
terraform refresh #Used to reconcile the state Terraform knows about (via its state file) with the real-world infrastructure.
6262
# terraform apply and refresh flags
6363
-backup=path #Path to the backup file
6464
-compact-warnings #Warning messages are shown in compact form
@@ -88,25 +88,25 @@ terraform plan -destroy
8888
#########
8989
#graph
9090
#########
91-
terraform graph #Creates a visual graph of Terraform resources
91+
terraform graph #Creates a visual graph of Terraform resources
9292
[terraform graph > web.dot
93-
dot web.dot -Tsvg -o web.svg] #Creates a graph and saves it as a .svg
93+
dot web.dot -Tsvg -o web.svg] #Creates a graph and saves it as a .svg
9494

9595
#########
9696
#validate and formatting
9797
#########
98-
terraform validate #Checks the syntax, validates the configuration files, and returns any errors
99-
terraform fmt #Formats configuration files
98+
terraform validate #Checks the syntax, validates the configuration files, and returns any errors
99+
terraform fmt #Formats configuration files
100100

101101
# terraform validate flags
102-
-json #Output in json format
103-
-no-color #Output won't contian any color
102+
-json #Output in json format
103+
-no-color #Output won't contian any color
104104
# terraform fmt flags
105-
-list=false #Don't lisst the files containing formatting inconsistencies
106-
-write=false #Don't overwrite the input files. (This is implied by -check or when the input is STDIN.)
107-
-diff #Display diffs of formatting changes
108-
-check #Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise.
109-
-recursive #Also process files in subdirectories. By default, only the given directory (or current directory) is processed.
105+
-list=false #Don't lisst the files containing formatting inconsistencies
106+
-write=false #Don't overwrite the input files. (This is implied by -check or when the input is STDIN.)
107+
-diff #Display diffs of formatting changes
108+
-check #Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise.
109+
-recursive #Also process files in subdirectories. By default, only the given directory (or current directory) is processed.
110110

111111
#########
112112
#providers
@@ -122,20 +122,20 @@ terraform state push #Pushes state in remote backend stor
122122
###########
123123
#workspaces
124124
###########
125-
terraform workspace new dev #Creates a new workspace and then selects it
126-
terraform workspace select dev #Selects a workspace
127-
terraform workspace list #List workspaces
125+
terraform workspace new dev #Creates a new workspace and then selects it
126+
terraform workspace select dev #Selects a workspace
127+
terraform workspace list #List workspaces
128128

129129
###########
130130
#More CLI
131131
###########
132-
terraform taint #Marks a resource as tainted, forcing it to be destroyed and recreated on the next apply
132+
terraform taint #Marks a resource as tainted, forcing it to be destroyed and recreated on the next apply
133133

134134
# terraform taint flags: terraform taint [options] address
135135
#address argument is the address of the resource to mark as tainted.
136-
-allow-missing #If specified, the command will succeed (exit code 0) even if the resource is missing. The command can still error, but only in critically erroneous cases.
137-
-backup=path #Path to the backup file. Defaults to -state-out with the ".backup" extension. Disabled by setting to "-".
138-
-lock=true #Lock the state file when locking is supported.
139-
-lock-timeout=0s #Duration to retry a state lock.
140-
-state=path #Path to read and write the state file to. Defaults to "terraform.tfstate". Ignored when remote state is used.
141-
-state-out=path #Path to write updated state file. By default, the -state path will be used. Ignored when remote state is used.
136+
-allow-missing #If specified, the command will succeed (exit code 0) even if the resource is missing. The command can still error, but only in critically erroneous cases.
137+
-backup=path #Path to the backup file. Defaults to -state-out with the ".backup" extension. Disabled by setting to "-".
138+
-lock=true #Lock the state file when locking is supported.
139+
-lock-timeout=0s #Duration to retry a state lock.
140+
-state=path #Path to read and write the state file to. Defaults to "terraform.tfstate". Ignored when remote state is used.
141+
-state-out=path #Path to write updated state file. By default, the -state path will be used. Ignored when remote state is used.

0 commit comments

Comments
 (0)