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
kubeclr() { | |
kubectx | while read -r cluster ; do | |
echo "\ndelete $cluster (y/N)?"; | |
read -k1 -s del; | |
if [ $del = "y" ]; then | |
kubectx -d $cluster; | |
fi | |
done | |
} |
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
SOURCE_NAME="us-west1-docker.pkg.dev/zerok-dev/curl" | |
SOURCE_TAG="7.7.0" | |
TARGET_NAME="us-west1-docker.pkg.dev/zerok-prod/stage/curl" | |
TARGET_TAG="1.0.0" | |
docker pull $SOURCE_NAME:$SOURCE_TAG | |
docker tag $SOURCE_NAME:$SOURCE_TAG $TARGET_NAME:$TARGET_TAG | docker push $TARGET_NAME:$TARGET_TAG |
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 | |
cd /tmp/ | |
rm -rf istio* | |
curl -L https://istio.io/downloadIstio | sh - | |
cd istio* | |
find $HOME/.istioctl -not -name 'upgrade.sh' -delete |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Ballot | |
* @dev Implements voting process along with vote delegation | |
*/ | |
contract Ballot { |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title HelloWorld | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract HelloWorld { |
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 skipRepoList = [ /* List of repos to skip deletion. */ ] | |
const AWS_REGION = "us-west-2" | |
const { ECRClient, DescribeRepositoriesCommand, DeleteRepositoryCommand } = require("@aws-sdk/client-ecr"); | |
async function deleteRepositories(repoName) { | |
const awsClient = new ECRClient({ region: AWS_REGION }); | |
const deleteCommand = new DeleteRepositoryCommand({repositoryName: repoName, force: true}); | |
await awsClient.send(deleteCommand) | |
.then((DeleteRepositoryResponse) => { |
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 skipTaskDefList = [ /* List of task names to skip deletion. */ ] | |
const AWS_REGION = "us-west-2" | |
const { ECSClient, ListTaskDefinitionsCommand, DeregisterTaskDefinitionCommand } = require("@aws-sdk/client-ecs"); | |
async function deleteTaskDef(taskDefARN) { | |
const awsClient = new ECSClient({ region: AWS_REGION }); | |
const deleteCommand = new DeregisterTaskDefinitionCommand({taskDefinition: taskDefARN}); | |
await awsClient.send(deleteCommand) | |
.then((deregisterTaskDefinitionResponse) => { |