pandoc assets/metadata.yml chapters/*.md -o book.epub -S
Using WKHTMLtoPDF (no page numbers)
import com.atlassian.jira.component.ComponentAccessor | |
def customFieldManager = ComponentAccessor.getCustomFieldManager() | |
def optionsManager = ComponentAccessor.getOptionsManager() | |
def formField = getFieldByName("SelectListA") // *name* of your custom field | |
def customField = customFieldManager.getCustomFieldObject(formField.getFieldId()) | |
def config = customField.getRelevantConfig(getIssueContext()) | |
def options = optionsManager.getOptions(config) |
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
#!/bin/bash | |
# Requires: awscli (http://aws.amazon.com/cli/) | |
# Prints out a list of all security groups and their settings, just for quickly auditing it. | |
# Your AWS credentials | |
if [ -z ${AWS_ACCESS_KEY_ID} ]; then | |
export AWS_ACCESS_KEY_ID='***' | |
export AWS_SECRET_ACCESS_KEY='***' | |
fi |
{# style 1 - long form #} | |
{% if filepath == '/var/opt/tomcat_1' %} | |
{% set tomcat_value = tomcat_1_value %} | |
{% else %} | |
{% set tomcat_value = tomcat_2_value %} | |
{% endif %} | |
{# style 2 - short form #} | |
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
import boto3 | |
def get_instance_name(fid): | |
""" | |
When given an instance ID as str e.g. 'i-1234567', return the instance 'Name' from the name tag. | |
:param fid: | |
:return: | |
""" | |
ec2 = boto3.resource('ec2') | |
ec2instance = ec2.Instance(fid) |
#!/usr/bin/env python | |
import boto3 | |
import argparse | |
def lookup_by_id(sgid): | |
sg = ec2.get_all_security_groups(group_ids=sgid) | |
return sg[0].name | |
#!/bin/bash | |
curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json | jq -r '.products[].attributes["instanceType"]' | sort -u | grep '\.' | |
#!/usr/bin/env python | |
##### USE ON YOUR OWN RISK - THIS IS GOING TO DEREGISTER AMI OLDER THAN 30 DAYS | |
import boto3 | |
from dateutil.parser import parse | |
import datetime | |
age = 30 | |
aws_profile_name = 'prod' | |
def days_old(date): | |
get_date_obj = parse(date) |