Skip to content

Instantly share code, notes, and snippets.

@d3vAdv3ntur3s
d3vAdv3ntur3s / ssl-config-generation-localhost.md
Created March 14, 2021 15:43
SSL TLS certificate generation instructions using mkcert for Java / Spring Boot apps

SSL Certificate Generation

Keystore & mkcert

  • PKCS12 is the industry standard, however, java has a proprietary format specific for Java called JKS, we will stick with PKC12 for our keystore.
  • Managing the generation of certs and trust store system wide, mkcert is an incredibly useful tool

Install mkcert

brew install mkcert
@d3vAdv3ntur3s
d3vAdv3ntur3s / db_init.sh
Created March 14, 2021 14:33
Example docker-compose with initialise script mount, network, healthcheck and volume
#!/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 #
#######################################################################################
@d3vAdv3ntur3s
d3vAdv3ntur3s / build.gradle
Last active March 14, 2021 14:39 — forked from jahe/gradle-cheatsheet.gradle
Gradle Cheatsheet
//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'
@d3vAdv3ntur3s
d3vAdv3ntur3s / Backup and view Slack workspace conversation history
Created May 14, 2019 19:14
Instructions for how to backup and view Slack workspace chat history
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

Keybase proof

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": {