Skip to content

Instantly share code, notes, and snippets.


Libert Schmidt rschmidtz

Block or report user

Report or block rschmidtz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rschmidtz /
Last active Feb 25, 2020
Resize EBS storage from the EC2 itself (Amazon Linux AMI release 2018.03)
# Specify the desired volume size in GiB as a command-line argument. If not specified, default to 20 GiB.
# Install the jq command-line JSON processor.
sudo yum -y install jq
# Get the ID of the envrionment host Amazon EC2 instance.
rschmidtz /
Created Nov 23, 2019
Launch 100 EC2 + EIP and install vyprVPN
import logging
import boto3
from botocore.exceptions import ClientError
import time
rschmidtz / eips-centos7
Created Sep 19, 2019
Multiple EIP in the same subnet (RHEL / Centos7)
View eips-centos7
rschmidtz / Dockerfile
Created Aug 20, 2019
Dockerfile to understand RUN , CMD and ENTRYPOINT
View Dockerfile
FROM alpine:3.10.1
RUN apk add --update /
python3 /
py-pip /
##Example CMD exec form
#CMD ['python3','--version']
View audio.bash
#ffmg = ffmpeg -i 2.5-2.mp3 -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 2.5-2-e.mp3
for i in $(ls *.mp3); do
#echo audio: $i
NAME=`echo "$i" | cut -d'.' -f1`
# to use, copy this file into your .git/hooks folder in your git repo
# Rename the file to: pre-commit
# make sure to add execute permissions using: chmod +x .git/hooks/pre-commit
command -v pngcrush >/dev/null 2>&1 || {
echo "\033[1mPlease install pngcrush to reduce images size before commit\033[0m"
echo "Install pngcrush with the following:"
echo "\t \033[1mbrew install pngcrush\033[0m"
echo "OR"
echo "\t Site: \033[1m\033[4m\033[0m"
View aws_listAccountRole.json
"AWSTemplateFormatVersion": "2010-09-09",
"Outputs": {
"CCRoleArn": {
"Value": {
"Fn::GetAtt": [
rschmidtz /
Created Nov 30, 2017 — forked from JohnPreston/
Generates, encrypt and store password in DynamoDB
import base64
import uuid
import httplib
import urlparse
import json
import boto3
import string
import random
rschmidtz / s3PolicyPublic.json
Created Nov 20, 2017
grant access to every object in the bucket example
View s3PolicyPublic.json
"Id": "Policy1397632521960",
"Statement": [
"Sid": "Stmt1397633323327",
"Action": [
"Effect": "Allow",
"Resource": "arn:aws:s3:::example/*",
rschmidtz /
Created Oct 26, 2017
Create Snapshots with AWS Lambda
# Backup all in-use volumes in all regions
import boto3
def lambda_handler(event, context):
ec2 = boto3.client('ec2')
# Get list of regions
reg = 'us-east-1'
You can’t perform that action at this time.