Skip to content

Instantly share code, notes, and snippets.

View cdahlhausen's full-sized avatar

Christian Dahlhausen cdahlhausen

View GitHub Profile
@cdahlhausen
cdahlhausen / gist:ad48319e87899cb0df003bfd10f2a417
Created April 5, 2019 14:16
AWS c5 instance performance tests s3/efs/ebs
Write-Tests:
Create a random 100Mb, 1GB, 10GB file on each file system and measure time for creation
Copy each of the test files from local EBS to each filesystem. Measure time.
1GB dd if=/dev/urandom of=1GB_testfile bs=1024 count=1024000
100MB dd if=/dev/urandom of=100MB_testfile bs=1024 count=102400
10 MB dd if=/dev/urandom of=10MB_testfile bs=1024 count=10240
@cdahlhausen
cdahlhausen / keybase.md
Created November 13, 2018 13:55
keybase.md

Keybase proof

I hereby claim:

  • I am cdahlhausen on github.
  • I am cdahlhausen (https://keybase.io/cdahlhausen) on keybase.
  • I have a public key whose fingerprint is FAD9 83AF F24D C1EC 3DF6 1B11 2F9C 2DA7 8C5A 5890

To claim this, I am signing this object:

@cdahlhausen
cdahlhausen / pedantically_commented_playbook.yml
Created September 22, 2017 15:30 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@cdahlhausen
cdahlhausen / ebs_autoscale.sh
Created September 7, 2017 15:16 — forked from DanielMuller/ebs_autoscale.sh
Allow autoscaling EBS volumes based on disk usage
#!/bin/bash
# Allows to attach and remove EBS volumes managed under LVM to
# have a dynamically sized partition attached to an EC2 instance
#
# Intance needs either to be launched with a role able to access to relevant AWS API endpoints
# or the credentials can be hardcoded in the config.
#
# Minimal IAM Role:
# {
@cdahlhausen
cdahlhausen / grafana custom.ini
Created June 27, 2017 21:27 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@cdahlhausen
cdahlhausen / grafana custom.ini
Created June 27, 2017 21:27 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
- name: add common user public keys
become: yes
authorized_key: user="{{ item.name }}"
key="{{ item.pubkeyfile }}"
state=present
with_items:
- { name: 'auser', pubkeyfile: "{{ var_adiamond_sskey }}" }
- { name: 'buser', pubkeyfile: "https://github.com/buser.keys" }
- { name: "{{system_default_user}}", pubkeyfile: "{{var_deploy_sshkey }}" }
@cdahlhausen
cdahlhausen / init_ansible_role.sh
Created November 3, 2015 20:43 — forked from zircote/init_ansible_role.sh
bash function to create a boilerplate ansible role (I am lazy)
#!/bin/sh
function init_ansible_role {
if [[ ! -n $1 ]]; then
echo no init
return
fi
mkdir -p roles/${1}/{defaults,tasks,files,templates,vars,handlers,meta}
for i in defaults tasks vars handlers meta; do
if [[ ! -f roles/${1}/${i}/main.yaml ]]; then
echo creating file: roles/${1}/${i}/main.yaml