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
budgester@thor ~ $ docker images --digests | |
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE | |
python 3.10.4-slim sha256:557745c5e06c874ba811efe2e002aff21b6cc405b828952fcfa16dea52d56dbb 56cb06bdaede 7 months ago 125MB | |
343327909574.dkr.ecr.eu-west-1.amazonaws.com/python-test 3.10.4-slim sha256:b4473ae501f273874a4379f489ea0270dd4dd479d26c72d6d520fb4e717493c6 56cb06bdaede 7 months ago 125MB | |
343327909574.dkr.ecr.eu-west-2.amazonaws.com/python-test2 3.10.4-slim sha256:b4473ae501f273874a4379f489ea0270dd4dd479d26c72d6d520fb4e717493c6 56cb06bdaede 7 months ago 125MB |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
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
post { | |
success{ | |
slackSend channel: "#budgester-alerts", color: "good", message: "Deploy (<https://budgester.com|Budgester>) : (<${env.BUILD_URL}|Open>)" | |
} | |
failure { | |
slackSend channel: "#budgester-alerts", color: "danger", message: "Deploy (<https://budgester.com|Budgester>) : (<${env.BUILD_URL}|Open>)" | |
} | |
cleanup { | |
cleanWs() | |
} |
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
psql -h <hostname or ip address> -p <port number> -d <database> -U <username> |
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 cognito-idp list-users --user-pool-id ***** --query 'Users[]' | jq -r '.[] | [.UserStatus, .Attributes[2].Value] | @tsv' | sort |
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
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
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
Your find should look like that to avoid sending directory names to sed: | |
find ./ -type f -exec sed -i -e 's/apple/orange/g' {} \; | |
Delete lines in file | |
find ./ -type f -exec sed -i -e '/email/d' {} \; |
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
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class, | |
Jenkins.instance, | |
null, | |
null | |
); | |
for (c in creds) { | |
println( ( c.properties.privateKeySource ? "ID: " + c.id + ", UserName: " + c.username + ", Private Key: " + c.getPrivateKey() : "")) | |
} | |
for (c in creds) { |
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
### Keybase proof | |
I hereby claim: | |
* I am budgester on github. | |
* I am budgester (https://keybase.io/budgester) on keybase. | |
* I have a public key ASCAAwDvXJxzauxKKrMT9Yf3-2Jx_m-Me6TX0Yv-hhOnGgo | |
To claim this, I am signing this object: |
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
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
NewerOlder