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 / 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'
rschmidtz /
Created Oct 12, 2017
Install aws ssm agent in Ubuntu
cd /tmp
sudo dpkg -i amazon-ssm-agent.deb
sudo service amazon-ssm-agent start
rschmidtz /
Created May 6, 2017
Get private ip from AWS from instances with tags filters: Env:test
import boto3
from string import Template
Return values of key value instance
class EC2:
def get_tags(self,instance):
You can’t perform that action at this time.