If you're trying to query Mongo and get this message:
Type "it" for more
Run this command:
DBQuery.shellBatchSize = 200;
If you're trying to query Mongo and get this message:
Type "it" for more
Run this command:
DBQuery.shellBatchSize = 200;
If you want to return only unique keys/fields in mongo query while searching inside a collection:
db.users.distinct("name")If you want to know how many entries were returned:
db.users.distinct("name").lengthIf you need to generate some random data, use this tool:
git clone https://github.com/oliver006/elasticsearch-test-data.git
cd elasticsearch-test-data
pip install -r requirements.txtPass in the required info:
/es_test_data.py --es-url=http://:9200To delete files older than a certain date, you can use the following:
sudo find . -mtime +<AmountOfDays> -type f -delete
#linux #bash
If you're getting the following error while using travis CI:
Downloading sbt launcher for 1.2.6:
221 From https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/1.2.6/sbt-launch-1.2.6.jar
222 To /home/travis/.sbt/launchers/1.2.6/sbt-launch.jar
223Downloading sbt launcher 1.2.6 md5 hash:
224 From https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt-launch/1.2.6/sbt-launch-1.2.6.jar.md5
225 To /home/travis/.sbt/launchers/1.2.6/sbt-launch.jar.md5
226cat: /home/travis/.sbt/launchers/1.2.6/sbt-launch.jar.md5: No such file or directory
227md5sum: 'standard input': no properly formatted MD5 checksum lines found
To schedule the shutdown and startup of your EC2 instances, you can use this Lambda Python code. Please note that this code looks for EC2 instance by their Tag(line 8), e.g role = runner.
import boto3
# Define variables
client = boto3.client('ec2', region_name="us-east-1")
filters =[ { 'Name': 'tag:<KeyName>', 'Values': ['<ValueName>'] } ]
# Get the list of instances by searching for the tag configured above
If you want to resolve a specific domain with a specific resolver/nameserver, add this:
sudo mkdir /etc/resolver
sudo echo "nameserver <IPAddress>" >> /etc/resolver/internal.domain.io
This was tested on Big Sur 11.2.3
If you're using Docker Hub as a docker registry and using an anonymous account at some point you will hit the rate limit. To know where you stand use this:
IMAGE="ratelimitpreview/test"
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$IMAGE:pull" | jq -r .token)
curl --head -H "Authorization: Bearer $TOKEN" https://registry-1.docker.io/v2/$IMAGE/manifests/latest
This will output:
If you get this error while trying to launch Telepresence on your K8s env:
Failed to pull image "datawire/telepresence-k8s:0.109":
rpc error: code = Unknown desc = Error response from daemon:
toomanyrequests: You have reached your pull rate limit.
You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Upload it to your registry, for example AWS ECR:
If you want to debug your deployment of kafka-connect, pass in the env variable or edit the K8s deployment:
- name: CONNECT_LOG4J_LOGGERS
value: org.apache.kafka.connect=DEBUG
You can also use multiple loggers:
- name: CONNECT_LOG4J_LOGGERS
value: "log4j.logger.io.confluent.inbound-kafka-to-s3=DEBUG,org.apache.kafka.connect=DEBUG"