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
| syntax on | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " let Vundle manage Vundle, required | |
| Plugin 'gmarik/Vundle.vim' | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' "to highlight files in nerdtree | |
| Plugin 'davidhalter/jedi-vim' |
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
| /* 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.#'), |
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
| ### 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 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
| 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 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
| 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 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
| 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 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
| aws cognito-idp list-users --user-pool-id ***** --query 'Users[]' | jq -r '.[] | [.UserStatus, .Attributes[2].Value] | @tsv' | sort |
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
| psql -h <hostname or ip address> -p <port number> -d <database> -U <username> |
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
| 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 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
| 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\] $ " |