Skip to content

Instantly share code, notes, and snippets.

View gist:4b0a48ea3ef2e9207952
# 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
@franklanganke
franklanganke / stopInstancesByTag.sh
Created May 19, 2015 13:36
Stop EC2 instances by tag
View stopInstancesByTag.sh
#!/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
@franklanganke
franklanganke / fixSSLHandshakeErrorOnAWSLinux.md
Created February 8, 2016 15:28
Fix SSL Handshake error on AWS Linux
View fixSSLHandshakeErrorOnAWSLinux.md

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 / botoVirtualEnvFix.md
Created February 10, 2016 15:58
Using virtualenv Python in local Ansible
View botoVirtualEnvFix.md
@franklanganke
franklanganke / changeRundeckDateFormat.md
Last active November 4, 2016 15:58
rundeck locale date format
View changeRundeckDateFormat.md

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
View rundeck-config.properties
# 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