- Start docker before connecting vpn (to get local ip, eg 192.168.99.100)
- After start, connect to VPN, then follow next steps
- From: boot2docker/boot2docker#628
Add port forwarding to the NAT'd adapter in VirtualBox, add:
Rule 1:host IP=127.0.0.1 , port=2376
guest ip=[blank] , port=2376
like so:
- From https://www.iancollington.com/docker-and-cisco-anyconnect-vpn/ \
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Austrian Association for Software Tool Integration (AASTI) | |
under one or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information regarding copyright | |
ownership. The AASTI licenses this file to you under the Apache License, | |
Version 2.0 (the "License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at |
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
#!/usr/bin/env ruby | |
# USAGE: | |
# gem install terraforming | |
# export AWS_PROFILE=xxx | |
# mkdir -p ~/projects/terraform | |
# cd ~/projects/terraform | |
# mkdir -p imports/[account]/[region] | |
# cd imports/[account]/[region] | |
# ../../../bin/terraforming-import-all |
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
# Original: http://blog.thelinuxkid.com/2013/06/automatically-start-tmux-on-ssh.html | |
# Saving for our children. | |
# This should always be run last either in .bashrc or as a script in .bashrc.d | |
if [[ -z "$TMUX" ]]; then | |
tmux has-session &> /dev/null | |
if [ $? -eq 1 ]; then | |
exec tmux new | |
exit | |
else |
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
#### first class expresssion | |
variable "ami" {} | |
resource "aws_instance" "example" { | |
ami = var.ami | |
} | |
#### list & map | |
resource "aws_instance" "example" { | |
vpc_security_group_ids = var.security_group_id != "" ? [var.security_group_id] : [] | |
} |
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
//********************************************************************************************************* | |
//makeTodo: Call other functions to make the daily Todo | |
//********************************************************************************************************* | |
function makeTodo(){ | |
//Populate Header | |
grabHeader("B1") | |
//Populate Task List |
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
// | |
// Intended to be used as a bookmarklet that is executed when on the AWS Single Sign-On landing page, | |
// this script scans the named SSO application and its accounts (specified below) and generates the | |
// ~/.aws/credentials content and copies it to the clipboard ready to be used. | |
// | |
// the SSO application to use | |
const APPLICATION_TITLE = "AWS Account"; | |
// specify the names of the accounts to include (case sensitive). Any that are not found will be ignored. |
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
#!/usr/bin/env bash | |
query_string=$(cat << EndOfMessage | |
fields @timestamp, @logStream, headers.X-Amzn-Trace-Id, @transId, @message | |
| parse @message /(transactionId:[ ]?)(?<@transId>[a-zA-Z0-9]+)/ | |
| filter @transId = a4c475516be5445a87fbb81bb7a4b365 | |
EndOfMessage | |
) \ | |
&& \ | |
query_id=`aws logs start-query --log-group-name /aws/lambda/console_log \ |
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
#!/bin/bash | |
user_name="$1" | |
echo "Removing user: ${user_name}" | |
echo "Deleting Access Keys:" | |
keys=("$(aws iam list-access-keys --user-name "${user_name}" | jq -r '.AccessKeyMetadata[] | .AccessKeyId')") | |
if [[ "${#keys}" -gt "0" ]]; then | |
# shellcheck disable=SC2068 |
Copied from the official Docker-for-mac documentation (thanks Brett for the updated doc pointer):
Docker Desktop for Mac comes with scripts to enable completion for the docker, docker-machine, and docker-compose commands. The completion scripts may be found inside Docker.app, in the Contents/Resources/etc/
directory and can be installed both in Bash and Zsh.
Bash has built-in support for completion To activate completion for Docker commands, these files need to be copied or symlinked to your bash_completion.d/
directory. For example, if you installed bash via Homebrew:
OlderNewer