This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: myapp | |
| labels: | |
| app: myapp | |
| spec: | |
| replicas: 3 | |
| template: | |
| metadata: |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "generic/ubuntu1904" | |
| # set the provider | |
| config.vm.provider "virtualbox" | |
| # configure the provider | |
| config.vm.provider "virtualbox" do |v| | |
| v.cpus = 4 | |
| v.memory = 4096 | |
| end |
| # A deployment ensures pod(s) are restarted on failure | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: memsql | |
| spec: | |
| replicas: 1 # only create one pod (container) | |
| selector: | |
| matchLabels: | |
| app: memsql |
| FROM mysql:5 as sqldump | |
| WORKDIR /home | |
| # Copy required artifacts and source code | |
| COPY initial.sql . | |
| COPY java-program ./java-program | |
| COPY sqldump.sh . | |
| # Copy jdk11 and gradle from the gradle:jdk11 image | |
| COPY --from=gradle:jdk11 /opt/java /opt/java |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| // vim: syntax=sql | |
| CREATE OR REPLACE FUNCTION create_constraint_if_not_exists (t_name text, c_name text, constraint_sql text) | |
| RETURNS void | |
| AS | |
| $BODY$ | |
| BEGIN | |
| -- Look for our constraint | |
| IF NOT EXISTS (SELECT constraint_name | |
| FROM information_schema.constraint_column_usage |
| import scala.annotation.tailrec | |
| object ArraySort extends App { | |
| val array = Array(23, 4325, 4, 11, 34, 324, 65) | |
| def bubbleSort(array: Array[Int]): Array[Int] = { | |
| def swapElements(array: Array[Int]): Int = { | |
| var swapsCount = 0 | |
| for (i ← 1 until array.length) { | |
| val leftEl = array(i - 1) |
| # ./ffmpeg_vp9_2pass.sh input.mp4 2M 96k 1920 60 | |
| set -x | |
| input="$1" | |
| bitrate="${2:-2M}" | |
| audio_bitrate="${3:-96k}" | |
| scale="'min(${4:-1920},iw)':'ih*$4/iw'" | |
| fps="${5:-60}" |
| Symbol | Explanation | Hint |
|---|---|---|
\/ |
Right-leaning Either | Split ways, go one way or the other |
-\/ |
Left value of \/ |
- is on the left side |
\/- |
Right value of \/ |
- is on the right side |
>>= |
flatMap |
shove result into |
>> |
flatMap(_ => ..) |
shove into, but ignore the result |
|@| |
Applicatives into Tuple | Scream operator |
|+| |
Append via Monoid | + was taken |
| `> | ` | fa.map(_ => b) |