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
properties([ | |
parameters([ | |
choice(choices: ['Development','QA'], description: 'Select Deployment Environment', name: 'DEPLOYMENT_ENVIRONMENT'), | |
choice(choices: ['release','snapshot'], description: 'Select Nexus Repo', name: 'NEXUS_REPO'), | |
[$class: 'CascadeChoiceParameter', | |
choiceType: 'PT_SINGLE_SELECT', | |
filterLength: 1, | |
filterable: false, | |
name: 'ARTIFACT_VERSION', | |
randomName: 'choice-parameter-7777777777777777', |
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
# We want to rename an existing branch on remote repo to a new one using cli | |
# Optional if we already have the branch on local system | |
$ git checkout OLD_BRANCH_NAME | |
# switch to any branch other than the branch that need to be renamed | |
$ git checkout master | |
$ git branch -m OLD_BRANCH_NAME NEW_BRANCH_NAME |
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
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
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 | |
read -p "Enter the container repository url with port number e.g 10.10.10.10:32000 => " repo_url | |
repo=( $(curl http://$repo_url/v2/_catalog | jq -r .repositories[]) ) | |
for r in ${repo[@]}; do | |
tags=( $(skopeo list-tags --tls-verify=false docker://$repo_url/$r | jq -r .Tags[]) ) | |
for t in ${tags[@]}; do | |
skopeo delete --tls-verify=false docker://$repo_url/$r:$t |
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
#### This script is written to update your kubeconfig file for eks. It will first get sts token for the role, that is mapped | |
#### with EKS cluster kubernetes using aws_auth config map. And then update your kubeconfig file for the cluster. | |
#### Replace role-arn with the role that is mapped with EKS cluster kubernetes using aws_auth config map. | |
#### Ref: https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html | |
#!/bin/bash | |
echo $(whoami) |
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
Dear BOSS, | |
Please accept this letter as formal notification that I am resigning from my position as JOB TITLE with COMPANY. My last day will be DATE OF LAST DAY. | |
Thank you so much for the opportunity to work in this position for the past DURATION. I’ve greatly enjoyed and appreciated the opportunities I’ve had to WTF DID YOU DO, and I’ve learned many things, all of which I will take with me throughout my career. | |
During my last two weeks, I’ll do everything possible to wrap up my duties and train other team members. Please let me know if there’s anything else I can do to aid during the transition. | |
I wish COMPANY continued success, and I hope to stay in touch in the future. | |
Sincerely, |
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 | |
set -eu | |
export SNAP_NAME="microk8s" | |
export SNAP_DATA="/var/snap/microk8s/current/" | |
export SNAP="/snap/microk8s/current/" | |
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH" | |
source $SNAP/actions/common/utils.sh |
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
### What we are trying to achieve is this: (https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/) with automatic script ### | |
### Remember you need to install aws-cli and use aws configure to add the credentails, to run aws commands ### | |
### Also assuming you have enabled MFA on aws console and know how to generate MFA code using Authy/Google Authenticator/ etc. | |
#!/bin/bash -xe | |
# Getting temporary credentails from aws using MFA token from authy or google authenticator | |
ARN=arn:aws:iam::{Account ID}:mfa/{UserName} | |
# checking for aws path |
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
from __future__ import absolute_import, print_function, unicode_literals | |
import boto3 | |
def clean_old_lambda_versions(): | |
client = boto3.client('lambda') | |
functions = client.list_functions()['Functions'] | |
for function in functions: | |
versions = client.list_versions_by_function(FunctionName=function['FunctionArn'])['Versions'] | |
for version in versions: |
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/sh | |
# Make sure to: | |
# 1) Name this file `backup.sh` and place it in /home/ubuntu | |
# 2) Run sudo apt-get install awscli to install the AWSCLI | |
# 3) Run aws configure (enter s3-authorized IAM user and specify region) | |
# 4) Fill in DB host + name | |
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket) | |
# 6) Run chmod +x backup.sh | |
# 7) Test it out via ./backup.sh |
NewerOlder