Skip to content

Instantly share code, notes, and snippets.

View franklanganke's full-sized avatar

Frank Langanke franklanganke

View GitHub Profile
@franklanganke
franklanganke / botoVirtualEnvFix.md
Created February 10, 2016 15:58
Using virtualenv Python in local Ansible
@franklanganke
franklanganke / fixSSLHandshakeErrorOnAWSLinux.md
Created February 8, 2016 15:28
Fix SSL Handshake error on AWS Linux

Fixing http requests to Cloudflare SSL hosted sites.

$cat /etc/issues
`Amazon Linux AMI release 2015.09`
$ java -version
java version "1.7.0_91"
@franklanganke
franklanganke / changeRundeckDateFormat.md
Last active November 4, 2016 15:58
rundeck locale date format

Works on:

rundeck-2.5.1-1-GA
Ubuntu 14.04.2 LTS (trusty)

cd /var/lib/rundeck/exp/webapp/WEB-INF/grails-app/i18n
cp messages.properties messages_de.properties
# find and edit following lines: 
cat messages_de.properties | grep jobslist\.date\.format
@franklanganke
franklanganke / rundeck-config.properties
Created July 28, 2015 08:08
Rundeck smtp email settings for AWS SES
# Rundeck version: 2.5.1-1, Ubuntu *.deb installation
grails.mail.host=email-smtp.eu-west-1.amazonaws.com
grails.mail.port=587
grails.mail.username=YOUR_SES_SMTP_USER
grails.mail.password=YOUR_SES_SMTP_PW
grails.mail.props = ["mail.smtp.starttls.enable":"true","mail.smtp.port":"587"]
grails.serverURL=http://rundeck.yourcompany.com:80
# from email or domain has to been verified by SES
grails.mail.default.from=rundeck@yourcompany.com
@franklanganke
franklanganke / stopInstancesByTag.sh
Created May 19, 2015 13:36
Stop EC2 instances by tag
#!/bin/bash
# 19.05.2015 Frank Langanke
# stop ec2 instances by tag "off-time" with value "true", can be used as cronjob
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin
_instances=$(aws ec2 describe-instances --filters "Name=tag:off-time,Values=true" --query Reservations[].Instances[].[InstanceId] --output text)
aws ec2 stop-instances --instance-ids $_instances
# update
sudo yum -y update
sudo yum -y upgrade
# enable EPEL6 by changing enabled=0 -> enabled=1
sudo vim /etc/yum.repos.d/epel.repo
# install htop
sudo yum install htop