View steps.md

Software:

Steps

  • dump and gzip postgres (source)
pg_dump -Ox -T sessions -U mos mos_staging > ~/mos_staging.sql
View sed.md

delete line starting with "SET"

sed -e '/^SET/ d;' mos_production_data_inserts.sql > mos_production_data_inserts_fixed.sql 

substitute "timestamp" with "datetime"

sed -e 's/timestamp/datetime/' mos_production_data_inserts.sql > mos_production_data_inserts_fixed.sql 
View gist:fa08d51c206d5d4acbedabdf50016ea9
When table/db is Latin1 and you have UTF data convert source db to UTF before import:
```
show full columns from documents;
ALTER DATABASE mos_production CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE mos_production
ALTER TABLE documents CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
```
View 00-solution.md

MySQL is started on a custom hostname, database, so you need to connect to database:3306.

View .netrc
machine github.com
login <TOKEN>
password x-oauth-basic
View 00.md
sudo service mysql stop
sudo mkdir -p /var/run/mysqld
sudo chown mysql:mysql /var/run/mysqld
sudo mysqld_safe --skip-grant-tables

mysql
View 00-README.md

When an interger is sent for monitor>type an internal error occurs. If a string is sent as in the main.yml example it is okay.

When an internal error occurs a 200 response not 500 is sent.

When an error occurs (e.g. monitor already exists) a 200 response is sent.

View spec.clj
(ns stuff.core
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen])
(:gen-class))
(ns-unmap *ns* 'attribute-type)
(ns-unmap *ns* 'validation-type)
(s/def ::string string?)
(s/def ::key ::string)
View example.clj
(require 'kinsky.client)
(def p (kinsky.client/producer { :bootstrap.servers "localhost:9092" } (kinsky.client/keyword-serializer) (kinsky.client/json-serializer)))
(kinsky.client/send! p "my-topic" :what-is-a-keyword { :foo "bar" })
View info.md