This file contains 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 | |
name="${1?needs one argument}" | |
containerId=$(docker ps | grep $name | grep -o '^\w\+') | |
if [ $(echo $containerId | wc -w) -gt 1 ]; | |
then | |
echo "Multiple docker containers found for: $name" | |
exit 1 | |
fi |
This file contains 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
# Dynasty | |
# Stronghold | |
1 The Fruitful Port of the Mantis (foil) | |
# Sensei | |
# Event | |
# Holding |
This file contains 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
how to get from [{:text "AAA", :code "0011"}] to {11 {:text "AAA", :code "0011"}} | |
note that key in result is made with use of following function: | |
=> (code->int "00123") | |
123 | |
=> (def t [{:code "0011" :text "AAA"}]) | |
[{:text "AAA", :code "0011"}] | |
=> (into {} (map identity t)) | |
{:text "AAA", :code "0011"} |