Skip to content

Instantly share code, notes, and snippets.

@mathsigit
mathsigit / Change2Java7.sh
Last active January 4, 2017 04:07
Setting of profiles
jenv global 1.7.0.80
function docker_container_ip() {
  container_ids=$(docker ps -aq)
  for cid in ${container_ids}
  do
    info=$(docker inspect -f 'name={{.Name}}  ip={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${cid})
    echo -e "$cid \t $info"
  done
}
@mathsigit
mathsigit / work.md
Created October 2, 2018 03:04
test

如何在 kafka connector 的 Restful Server 建立 https

1.使用 openssl 建立 SSL key, 整個 script 如下

#!/bin/bash
#Step 1
keytool -keystore kafka.server.keystore.jks -alias localhost -validity 365 -genkey
#Step 2
openssl req -new -x509 -keyout ca-key -out ca-cert -days 365
keytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert
@mathsigit
mathsigit / Pyenv.md
Last active December 2, 2020 09:49
Something about Pyenv On MacOS

Something about Pyenv On MacOS

How to install pyenv

Installing pyenv

#Via homebrew
brew update
brew install pyenv
@mathsigit
mathsigit / Intellij_remote_debug.md
Created September 15, 2020 09:41
Remote debugger via Intellij
@mathsigit
mathsigit / virtualenv.md
Created September 16, 2020 03:44
Command of virtualenv on MacOS

Virtualenv

Commands

Create virtualenv

virtualenv -p ${PYTHON_VERSION} ${ENV_FOLDER_PATH}

#For instance

Minikube

Install

macOS

Before you begin

To check if virtualization is supported on macOS, run the following command on your terminal.

@mathsigit
mathsigit / bobp-python.md
Created October 7, 2020 08:34 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens