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
s3Buffer, numBytes, err := DownloadS3File(event.S3Bucket, event.S3ObjectID, session) | |
header, err = GetHeader(s3Buffer) | |
var outBuffer []byte | |
if HeaderIndicatesConversionNeeded(header) { | |
outBuffer, err = ConvertBuffer(s3Buffer, event.ObjectID) | |
} else { | |
// outBuffer = s3Buffer or copy(outBuffer, s3Buffer) or ?? |
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
env = core.Environment(account=os.environ['CDK_DEFAULT_ACCOUNT'], region=os.environ['CDK_DEFAULT_REGION']) | |
these envars are set in my environment. I triple checked them. |
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
I have this file containing a lot of this | |
authorized_cidr = "" | |
concourse_keys = "" | |
encryption_key = "" | |
instance_ami = "" | |
name_prefix = "" | |
postgres_database = "" | |
postgres_host = "" | |
postgres_password = "" |
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
variable "task_name_suffixes" { | |
default = { | |
"0" = "lob-tables-01" | |
"1" = "datashack-tables-01" | |
"2" = "wexnet-tables-01" | |
"3" = "wexnet-tables-02" | |
"4" = "arch-tables-01" | |
"5" = "tiger-tables-01" | |
"6" = "tiger-tables-02" | |
"7" = "wwex-tables-01" |
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
$ aws cloudformation list-stack-resources --stack-name $stack_name --query "StackResourceSummaries[][?ResourceType=='AWS::EC2::Instance'][]" --region $reg --profile $acct | |
[] | |
$ aws cloudformation list-stack-resources --stack-name $stack_name --query "StackResourceSummaries[][?ResourceType=='AWS::EC2::Instance'][*]" --region $reg --profile $acct | |
[] | |
$ aws cloudformation list-stack-resources --stack-name $stack_name --query 'StackResourceSummaries[*][?contains(ResourceType,`Instance`) == true].[ResourceType,ResourceStatus,LogicalResourceId]' --region $reg --profile $acct | |
[] |
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
prompt$ aws ec2 describe-route-tables --filters "Name=route-table-id,Values=rtb-0f5e3e513a140d8c5" --query "RouteTables[*].Routes" --region eu-west-1 --profile sabre-as-dev-01 | |
[ | |
[ | |
{ | |
"Origin": "CreateRoute", | |
"DestinationCidrBlock": "10.179.216.0/24", | |
"State": "active", | |
"VpcPeeringConnectionId": "pcx-06756ed4585adc737" | |
}, | |
{ |
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
JAMB3LHHTDD:admin-scripts sg0218049$ python -m pip install boto3 | |
Traceback (most recent call last): | |
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main | |
"__main__", fname, loader, pkg_name) | |
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code | |
exec code in run_globals | |
File "/usr/local/lib/python2.7/site-packages/pip/__main__.py", line 16, in <module> | |
from pip._internal import main as _main # isort:skip # noqa | |
File "/usr/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 5, in <module> | |
import logging |
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
mylaptop:cleverfolder mycleverusername$ python cleverfile.py | |
Traceback (most recent call last): | |
File "cleverfile.py", line 3, in <module> | |
import ecshelper | |
File "/Users/mycleverusername/Documents/git.sabre.com/cleverfolder/ecshelper.py", line 3, in <module> | |
import boto3 | |
ImportError: No module named boto3 | |
mylaptop:cleverfolder mycleverusername$ pip install boto3 | |
Requirement already satisfied: boto3 in /usr/local/lib/python2.7/site-packages (1.7.62) |
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
(python-stuff) mylaptop:pythonstuff cleverusername$ python3 cleverfilename.py | |
File "cleverfilename.py", line 33 | |
print 'Adding peer {} with cidr {} to route table {}'.format(peer, ids[peer], rtb) | |
^ | |
SyntaxError: invalid syntax | |
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
# app/controllers/cf_deployments_controller.rb | |
class CfDeploymentsController < ApplicationController | |
before_action :set_cf_template | |
before_action :set_cf_template_cf_deployment, only: [:show, :update, :destroy] | |
# GET /cf_templates/:cf_template_id/cf_deployments | |
def index | |
json_response(@cf_template.cf_deployments) | |
end |
NewerOlder