Skip to content

Instantly share code, notes, and snippets.

View jsoros's full-sized avatar
🎯
Focusing

jsoros

🎯
Focusing
View GitHub Profile
uploads/affwp-debug.log
certs/server.key
server.key
.CSV
.PDF
.README.md.bud
.action
.actionScriptProperties
.angular-cli.json
.apport-ignore.xml
@jsoros
jsoros / prod-rds-snap-restore-to-dev-temp.sh
Created September 14, 2018 21:00 — forked from jfriv/prod-rds-snap-restore-to-dev-temp.sh
RDS manual snapshot and restore script
#!/bin/bash
# set up some variables
NOW_DATE=$(date '+%Y-%m-%d-%H-%M')
RESTORE_FROM_INSTANCE_ID=<source name>
TARGET_INSTANCE_ID=<target name>
TARGET_INSTANCE_CLASS=db.m4.large
VPC_ID=<vpc subnet id>
NEW_MASTER_PASS=<root password>
@jsoros
jsoros / deleteTaskDefinition.js
Created September 6, 2018 00:45 — forked from zoellner/deleteTaskDefinition.js
Delete AWS ECS Task Definition for Task Family
'use strict';
const AWS = require('aws-sdk');
const _h = require('highland');
const ecs = new AWS.ECS({region: process.env.AWS_REGION || 'us-east-1'});
let familyPrefix = null;
if (process.argv.length >= 3){
@jsoros
jsoros / aws-cli-ecs-cheat.sh
Created September 5, 2018 13:35 — forked from alvarow/aws-cli-ecs-cheat.sh
My AWS CLI ECS cheat sheet
# Get number of running containers of a service
aws --profile saml --output json ecs describe-services --cluster DIT-DMZ --service adp-e-bot-kafka | jq '.services[]|.desiredCount'
# Get a list of all task definitions
aws --profile saml --output text ecs list-task-definition-families
# Get the JSONs of a task definition
aws --profile saml --output json ecs describe-task-definition --task-def DIT-adp-e-bot | jq '.taskDefinition|if .networkMode then {family: .family, volumes: .volumes, containerDefinitions: .containerDefinitions, networkMode: .networkMode} else {family: .family, volumes: .volumes, containerDefinitions: .containerDefinitions} end'
# Get all task definition and save each as a JSON
@jsoros
jsoros / gist:b6f2a407cd4a95a5a556c11c96b14e91
Last active February 25, 2018 17:52 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@jsoros
jsoros / openssl_commands.md
Created January 23, 2018 14:55 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl