Skip to content

Instantly share code, notes, and snippets.

@niranjv
niranjv / install_python_36_amazon_linux.sh
Last active January 30, 2023 21:49
Install Python 3.6 in Amazon Linux
# A virtualenv running Python3.6 on Amazon Linux/EC2 (approximately) simulates the Python 3.6 Docker container used by Lambda
# and can be used for developing/testing Python 3.6 Lambda functions
# This script installs Python 3.6 on an EC2 instance running Amazon Linux and creates a virtualenv running this version of Python
# This is required because Amazon Linux does not come with Python 3.6 pre-installed
# and several packages available in Amazon Linux are not available in the Lambda Python 3.6 runtime
# The script has been tested successfully on a t2.micro EC2 instance (Root device type: ebs; Virtualization type: hvm)
# running Amazon Linux AMI 2017.03.0 (HVM), SSD Volume Type - ami-c58c1dd3
# and was developed with the help of AWS Support
@perfecto25
perfecto25 / Jira API - Bash
Last active January 30, 2023 09:58
Jira API examples
# get all Custom fields on Jira server
curl -D- -u user:password -X GET -H "Content-Type: application/json" https://jira.instance.com/rest/api/2/field
# get JSON output of an issue
curl -D- -u user:password -X GET -H "Content-Type: application/json" https://jira.instance.com/rest/api/2/search?jql=key=INFO-68
# make 2 issues linked to each other
curl -u user:password -w '<%{http_code}>' -H 'Content-Type: application/json' https://jira.instance.com/rest/api/2/issueLink -X POST --data '{"type":{"name":"Related Incident"},"inwardIssue":{"key":"ISS-123"},"outwardIssue":{"key":"SYS-456"}}'
@sl1pm4t
sl1pm4t / Command
Created December 5, 2016 01:52
Convert terraform output to terraform.tfvars format on command line
terraform output | sed -ne 's/\(.*\) = \(.*\)/\1="\2"/p'