I hereby claim:
- I am d3vadv3ntur3s on github.
- I am devadventures (https://keybase.io/devadventures) on keybase.
- I have a public key ASC0KBgXCd4-4OT3HZe2t7DP6JnhoDoMolrx9Mx-K2TOZQo To claim this, I am signing this object:
{
"body": {
"key": {I hereby claim:
{
"body": {
"key": {| Login to slack workspace -> https://api.slack.com/custom-integrations/legacy-tokens -> select generate token | |
| * Dependencies required: | |
| ** `pip install slacker` # https://github.com/os/slacker | |
| ** `pip install pick` # https://github.com/wong2/pick | |
| ** Download Slack export tool: `https://github.com/zach-snell/slack-export/archive/master.zip` | |
| ** `pip install slack-export-viewer` # https://github.com/hfaran/slack-export-viewer | |
| * Run instructions: | |
| ** `python slack_export.py --token xoxp-2474487112... --directMessages --publicChannels myTeam inccidents` # creates timestamped folder e.g. <yyyymmdd>-<hhmmss>-slack_export |
| //Gradle `>=6.8` example build file, resolve versions from `./gradle/gradle.properties` | |
| plugins { | |
| id 'org.springframework.boot' version '2.4.3' | |
| id 'io.spring.dependency-management' version '1.0.11.RELEASE' //BOM dependency management and exclusions | |
| id 'org.openapi.generator' version '5.0.1' | |
| id 'java' | |
| id 'maven-publish' | |
| id "com.google.osdetector" version "1.7.0" | |
| id 'signing' |
| #!/usr/bin/env bash | |
| # Exit immediately, do not continue running commands after error | |
| set -o errexit | |
| ##################################### NOTE ############################################ | |
| # Anything copied into the /docker-entrypoint-initdb.d will be executed automatically # | |
| # in alphanumeric order, can be useful 1_setup.sql, 2_data.sql # | |
| # This script will work for dockerised or system installed Postgres # | |
| ####################################################################################### |
mkcert is an incredibly useful toolbrew install mkcert| // openapi code generator using open api 3 specification | |
| // This will generate the model, api (interfaces only) | |
| // Spring-boot Server application using the SpringFox integration. | |
| // Generator Docs: https://openapi-generator.tech/docs/generators/spring/ | |
| // Gradle plugin: https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin | |
| // Gradle plugin example: https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle | |
| // templatesDir is to override the generated output, e.g. override method signature: Mono<ResponseEntity<Flux<ContactDTO>>> to Flux<ContactDTO> via mustache templates | |
| openApiGenerate { | |
| // don't try and reuse this variable for sourceSet as reference here is for a directory and generated code will append files to src/main/java under this directory |
| Older hosted version of Bitbucket 1.0 api | |
| Using token generated via your user settings instead of username password option. | |
| ``` | |
| curl -H "Authorization: Bearer GENERATE-TOKEN-HERE" \ | |
| "$HOSTED_BITBUCKET_URL/rest/api/1.0/projects/BTT/repos?limit=1000" | \ | |
| jq -r '.values[].links.clone[] | select(.name=="http") | .href' | \ | |
| xargs -n1 git clone | |
| ``` |
| # install for mac via brew | |
| $ brew install --cask 1password-cli | |
| # sign in via cmd line | |
| # You will need your secret key generated see 1password website: https://support.1password.com/secret-key/ | |
| # followed by password | |
| $ op signin subdomain.1password.com [email protected] | |
| # alias into bash_profile for ease sake | |
| $ alias 1pws='eval $(op signin subdomain)' |
id - this has to match the id from the mount secret command src - path to file locally docker build --no-cache . -t test-backend --secret id=npmrc,src=backend/.npmrc --file backend/dockerfile
## Mount secrets commannd
Part of the docker build kit, enabled by default
A way of securely mounting secrets
The secret will not be in the final image, one to use for example performing the command npm ci.
| SHELL:=/usr/bin/env bash #default shell used | |
| MAKEFLAGS += --silent --jobs 10 #don't echo commands and parallelise | |
| # Default task executed when running with make command only no args | |
| default: help | |
| #src: https://victoria.dev/blog/how-to-create-a-self-documenting-makefile/ | |
| help: ## Show this help | |
| @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' |