When you turn on cloudfront logs to s3 , then it create files like this:
Problem: If you create a table in Athena with single folder which has all the logs, it scans all the data and then gives you specific results. Which means if you want to scan…
Our universe is still expanding as per the big bang theory.
My theory says, if the earth was created 4.6 billion years ago, the earliest undisputed evidence of life on Earth dates at least from 3.5 billion years ago, Recognizable humans emerged at most 2 million years ago and we…
The common mistake a developer does while making a DockerFile is to use RUN instead of CMD. Developer believes that if she/he is using RUN then it means it would run the command, while we start the container. But it won’t.
Lets take an example of basic nodejs dockerFile which…
To shrink a shard in elasticsearch we already have a “/old_index/_shrink/new_index” endpoint , which creates a new index with less shards. An example of endpoint request :
# Tested Using Elasticsearch 6.5#for kibana
Current Url: https://example.com/files/video/data.mp4
Final Url: https://example.com/files/video/data.mp4?md5=HASH_HERE&expiry=UNIX_TIMESTAMP
There are two aspects to implement this :
In this section we’ll first do the authorization of links. If link doesn’t have valid md5 hash and expires query string then the response…
This script also helps to you set your own private ip and ec2 instance hostname and you can set your own custom environment variables on initial start of the machine.
import boto3, botocore
client = boto3.client(‘ec2’, region_name=’ap-south-1')
AMI = ‘ami-999999999999’
az_zone = ‘ap-south-1a’
InstanceType = “t3a.small”
SubnetId = ‘subnet-999999999999’
SecurityGroupId = ‘sg-999999999999’
To run a php code directly via cli , there’s a simple command for it.
Lets take a example of traditional php script and how to run it :
<?php echo time();
To run it use via cli:
Now, Lets run it without making the script:
php -r ‘echo time();’
They both would print the same output which is unix timestamp.
More examples of same kind:
php -r ‘echo “Hello World”;’
php -r ‘ print_r( explode( “ “ , ”Hello World” ) );’
php -r ‘var_dump(“Hello World”);’
php -r ‘echo strpos(“Hello World”, “W”);’
php -r ‘$a=10; $b=20; $c=$a+$b; echo $c;’
You can suggest more examples in the comment. Please do to help others.
Docker is like a virtual machine which does not create the whole virtual operating system, and allows applications to use the same Linux kernel as the system that they’re running on and only requires applications to be shipped with things not already running on the host computer. …
Git Tags are ref’s that point to specific points in history. They are usually created to make releases or freeze the code at certain point. A tag is like a branch that doesn’t update. You can create and delete tags using git shell or at github.com.
Before starting, you should…