Occasionally you may find you have a corrupt zsh history file preventing you from using the fc command or searching the history. Here's how to fix it.
Estimated reading time: 1 minutes
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: 'AWS::Serverless-2016-10-31' | |
| Description: An app that includes a DynamoDB table, Lambda function that writes to DynamoDB, and CloudWatch Event trigger | |
| Resources: | |
| LambdaWriteToDynamoDB: | |
| # A function that writes to a DynamoDB table on a schedule | |
| Type: 'AWS::Serverless::Function' | |
| Properties: | |
| FunctionName: LambdaWriteToDynamoDB |
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
| import numpy as np |
For left alignment
<img align="left" width="600" height="200" src="https://www.python.org/python-.png">
For right alignment
<img align="right" width="600" height="200" src="https://www.python.org/python-.png">
And for center alignment
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
| # Import Python packages | |
| import pandas as pd | |
| import cassandra | |
| import re | |
| import os | |
| import glob | |
| import numpy as np | |
| import json | |
| import csv |
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
| # Get ACCOUNT_ID and the REGION, and insert these values into the aws ecr command. | |
| export ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) | |
| export REGION="`wget -q -O - http://169.254.169.254/latest/meta-data/placement/region`" | |
| aws ecr get-login-password | docker login --username AWS --password-stdin ${ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com | |
| # Add a new tag to first-container that references the Amazon ECR container registry. | |
| docker tag first-container ${ACCOUNT_ID}.dkr.ecr.${REGION}.amazonaws.com/first-container:latest |
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
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: "Containers Exercise" | |
| Parameters: | |
| VpcCIDR: | |
| Default: 10.16.0.0/16 | |
| Description: "The CIDR block for the VPC" | |
| Type: String | |
| AllowedValues: | |
| - 10.16.0.0/16 |
NewerOlder