This is a gist
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 | |
cat <<EOF >> /etc/yum.repos.d/mongodb.repo | |
[mongodb] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
gpgcheck=0 | |
enabled=1 | |
EOF |
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 | |
# | |
# Creates a Domino server instance. | |
# | |
set -o nounset -o errexit | |
function die() { echo >&2 "$@"; exit 1; } | |
function require_sudo() { | |
if [ $UID != 0 ] |
I hereby claim:
- I am chrismyang on github.
- I am chrismyang (https://keybase.io/chrismyang) on keybase.
- I have a public key ASD89g6SsmAaRjn3tzNSdTvQ6NI2wzeIXfM8vn2FT--lcQo
To claim this, I am signing this object:
fdfd
We have log files spread out over several directories and want to automate the process of consolidating them back to a single location. Your task is to create a script that will perform this consolidation. Note that this script must be designed to run on different systems, which means that your script must be able to run on a system that is different than the one you have access to for this test.
Create a script in the file consolidate_logs.sh that does the following:
- For each log file in the LOG_LOCATIONS environment variable, copy that file to the location specified in LOG_DESTINATION but do not overwrite any files that already exist in LOG_DESTINATION
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
db.model_versions.getIndexes() | |
db.model_versions.createIndex( | |
{ | |
"modelId.value": 1, | |
"metadata.created": -1 | |
} | |
) | |
db.model_versions.getIndexes() | |
db.model_versions.getIndexes() |
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
/workbench |