I don't know anything about elasticsearch. All I know is this mongo-connector thing makes life easy. Here are some quick start instructions to follow for setup:
This file contains hidden or 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
| <!DOCTYPE html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Some Calendar</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| </head> | |
| <body> | |
| <!-- change your color if you want https://webmastermind.net/knowledgebase.php?action=displayarticle&id=15 --> | |
| <iframe src="https://calendar.google.com/calendar/embed |
- Follow these instructions to install mongo on 14.04.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
This file contains hidden or 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
| --- | |
| - name: Update apt cache | |
| apt: update_cache=yes | |
| - name: Install Ruby | |
| apt: pkg=ruby2.0 state=present | |
| - block: | |
| - name: Get CodeDeploy version | |
| set_fact: |
This file contains hidden or 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
| defaults write com.apple.dock static-only -bool TRUE; killall Dock | |
| defaults write com.apple.dock showhidden -bool TRUE; killall Dock | |
| defaults write com.apple.dock autohide-time-modifier -float 1; killall Dock | |
| defaults write com.apple.dock tilesize -int 16; killall Dock |
This file contains hidden or 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
| sqs = boto3.resource('sqs', 'us-east-1') # python code | |
| sqs_queue = sqs.get_queue_by_name(QueueName=queue_name) | |
| msg = json.dumps({'timestamp': time.time(), 'type': 'job', 'data': payload)) # equivalent of JSON.stringify | |
| sqs_queue.send_message(MessageBody=fake_message) |
This file contains hidden or 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
| #!/bin/bash | |
| # Usage: bash find_user_by_aws_access_key.sh SOME_AWS_ACCESS_KEY | |
| # This script finds the user in the account who has a given access key | |
| ACCESS_KEY=$1 | |
| for user in `aws iam list-users | jq -r '.Users[].UserName'`; do | |
| USER=`aws iam list-access-keys --user $user | jq '.AccessKeyMetadata[] | select(.AccessKeyId == "'"$ACCESS_KEY"'")'` | |
| if [ -n "$USER" ]; then | |
| echo "$USER" | |
| exit 0 |
This file contains hidden or 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
| Fri Nov 11 17:03:17 UTC 2016 |
This file contains hidden or 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
| provider "aws" { | |
| region = "us-east-1" | |
| } | |
| data "aws_instances" "boxes" { | |
| instance_ids = ["i-########", "i-########"] | |
| } | |
| data "template_file" "boxes" { | |
| template = "$${instance_subnet}" |
This file contains hidden or 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
| provider "aws" { | |
| region = "us-east-1" | |
| } | |
| data "aws_route_table" "art" { | |
| subnet_id = "subnet-########" | |
| } | |
| data "template_file" "art" { | |
| template = "$${rtb_route}" |