I hereby claim:
- I am jatin-lab49 on github.
- I am jatinlab49 (https://keybase.io/jatinlab49) on keybase.
- I have a public key ASDL2gGxoVavFI2u3i8X3sZNTTObiZazjtyEP0DGDfZj-wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Turns out you need can set the Cache-Control value for your S3 objects to be used with AWS Cloudfront in two ways!
The documentation at https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html says it has to be in the MetaData property.
But, you can also have it defined as a CacheControl value on the object. This can be done by passing it as the argument --cache-control max-age=0
to the aws s3 sync
command.
So, if using the IonReactRouter
in your Ionic React app, do note that the Page/component does not get unmounted when navigating to another component.
This is by design, per the discussion here: ionic-team/ionic-framework#20543
Confusing, but good to know!
In case you were wondering how I got the images used in the last TIL uploaded to Github, I used this hack: https://gist.github.com/vinkla/dca76249ba6b73c5dd66a4e986df4c8d
I ran into an issue where the deploy process needed to download multiple configuration files from artifactory.
To upload these files to artifactory, I used the artifacts
block in the build.gradle file as below:
project.group='com.lab49.example'
version='0.0.1-SNAPSHOT'
def devFile = file("./environments/dev/redirects.config.json")
Sometimes, if you are behind a corporate proxy - docker pull fails to download images from dockerhub with an error like below:
$ sudo docker pull swaggerapi/swagger-codegen-cli
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: read tcp 10.0.2.15:50136->3.223.220.229:443: read: connection reset by peer
You can check if the image is in your private registry by prepending the private docker hub before the image and checking if it works.
Ran into a weird issue today where I was refactoring a lot of Java classes. Trying to run Gradle build via IntelliJ kept failing.
The error was:
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
On a new Ubuntu VM, I noticed my fresh install of IntelliJ was printing a lot of logs to the console. After playing around with the existing projects logging configuration etc, I still could not squelch logs that began with:
2020-06-18 16:07:08
Full thread dump OpenJDK 64-Bit Server VM (25.252-b09 mixed mode):
I finally realized IntelliJ was attaching itself to the process, and this issue helped me figure out how to stop that: https://youtrack.jetbrains.com/issue/IDEA-203543
The trick is to disable the debugger.attach.to.process.action
registry key in IntelliJ. You can do this as follows:
Find Action...
So, I love to squash commits for a feature branch when it is merged to develop
(and then eventually to master).
This works well if your Pull Requests (or Merge requests on Gitlab) are accepted and merged relatively quickly.
Often though, I end up in this scenario:
develop
-> on commit AfeatureOne
-> commit B-C-D addedfeatureOne
against develop
featureTwo
branch which depends on featureOne
featureTwo
-> commit E-F-G addedfeatureOne
against develop
gets merged and squashed