This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Security Group for ALB | |
resource "aws_security_group" "atlassian-alb" { | |
name = "${var.name}-load-balancer" | |
description = "allow HTTPS to ${var.name} Load Balancer (ALB)" | |
vpc_id = "${module.vpc.vpc_id}" | |
ingress { | |
from_port = "443" | |
to_port = "443" | |
protocol = "tcp" | |
cidr_blocks = ["0.0.0.0/0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const Busboy = require('busboy'); | |
const BUCKET_NAME = ''; | |
const IAM_USER_KEY = ''; | |
const IAM_USER_SECRET = ''; | |
function uploadToS3(file) { | |
let s3bucket = new AWS.S3({ | |
accessKeyId: IAM_USER_KEY, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Finds last working/business day of the month. | |
* | |
* Not tested for cross-browser compability. Works in Node.js though. | |
* | |
* EXAMPLES: | |
* | |
* 1. Returns last day of the last month of the current year: | |
* | |
* var result = lastBusinessDayOfMonth(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Comparator; | |
import java.util.PriorityQueue; | |
import java.util.Queue; | |
// Given a stream of unsorted integers, find the median element in sorted order at any given time. | |
// http://www.ardendertat.com/2011/11/03/programming-interview-questions-13-median-of-integer-stream/ | |
public class MedianOfIntegerStream { | |
public Queue<Integer> minHeap; | |
public Queue<Integer> maxHeap; |