Skip to content

Instantly share code, notes, and snippets.

🗽
/dev/urandom

Libert Schmidt rschmidtz

🗽
/dev/urandom
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
rschmidtz / eips-centos7
Created Sep 19, 2019
Multiple EIP in the same subnet (RHEL / Centos7)
View eips-centos7
https://www.internetstaff.com/multiple-ec2-network-interfaces-on-red-hat-centos-7/
@rschmidtz
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 /
curl
##Example CMD exec form
#CMD ['python3','--version']
View audio.bash
#!/bin/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`
View pre-commit.sh
#!/bin/sh
# 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[4mhttp://pmt.sourceforge.net/pngcrush/\033[0m"
View aws_listAccountRole.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Outputs": {
"CCRoleArn": {
"Value": {
"Fn::GetAtt": [
"CCRole",
"Arn"
]
}
@rschmidtz
rschmidtz / encrypt_password_to_dyndb.py
Created Nov 30, 2017 — forked from JohnPreston/encrypt_password_to_dyndb.py
Generates, encrypt and store password in DynamoDB
View encrypt_password_to_dyndb.py
import base64
import uuid
import httplib
import urlparse
import json
import boto3
import string
import random
@rschmidtz
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": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::example/*",
@rschmidtz
rschmidtz / ebs_lambda.py
Created Oct 26, 2017
Create Snapshots with AWS Lambda
View ebs_lambda.py
# 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
rschmidtz / ssm_install.sh
Created Oct 12, 2017
Install aws ssm agent in Ubuntu
View ssm_install.sh
#!/bin/bash
cd /tmp
wget https://s3-us-west-1.amazonaws.com/amazon-ssm-us-west-1/latest/debian_amd64/amazon-ssm-agent.deb
sudo dpkg -i amazon-ssm-agent.deb
sudo service amazon-ssm-agent start
@rschmidtz
rschmidtz / get_privateIP_tags.py
Created May 6, 2017
Get private ip from AWS from instances with tags filters: Env:test
View get_privateIP_tags.py
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.