rd(tst,{name,desc}).
application:stop(mnesia).
mnesia:create_schema([node()]).
application:start(mnesia).
mnesia:create_table(tsts,
[{record_name, tst},
{attributes, record_info(fields, tst)},
{disc_copies, [node()]},
{type, set}]).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ | |
-d "username=admin" \ | |
-d 'password=admin' \ | |
-d 'grant_type=password' \ | |
-d 'client_id=admin-cli' | jq -r '.access_token') | |
curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
- Spec 1.2 @ http://yaml.org/spec/1.2/spec.html
- Human readable
- Machine processable
- Minimum structural elements
- Scalars (Strings/Numbers)
- Sequences (Arrays/Lists)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.crashdump | |
_build/* | |
rebar.lock | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is not an automated script | |
# Listing is only for line by line pasting | |
# Remove any existing installation | |
## sudo apt-get remove docker docker-engine docker.io | |
# For Kernel version > 4 overlay2 storage driver is preferred over aufs | |
# overlayfs already available in kernel version 4 | |
# See uname -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
now = datetime.now() | |
print(now.strftime("%Y-%m-%d-%M__%H-%M-%S")) | |
# >>> from datetime import datetime | |
# >>> now = datetime.now() | |
# >>> print(now.strftime("%Y-%m-%d-%M__%H-%M-%S")) | |
# 2018-07-07-47__07-47-00 | |
# >>> |
Docker Image with Erlang and Observer.
FROM debian:9
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends curl make wget && \
\
wget --no-check-certificate https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List netwoks | |
docker network ls | |
# Prune un-necessary networks | |
docker network prune | |
# Create a custom bridge network | |
# See man docker-network-create | |
docker network create \ | |
--driver=bridge\ |