Suppose you want to inject a list of values in your bean. You can do-
#prop file
mylist=x,y,z
#bean
@Value("${myList}")
String[] myList;
Suppose you want to inject a list of values in your bean. You can do-
#prop file
mylist=x,y,z
#bean
@Value("${myList}")
String[] myList;
Suppose you have a terraform/terragrunt directory that you have already applied. Now you want to move the directory to some other destination.
Here's what you can do-
terragrunt plan
should output No Changes
terragrunt state pull > /tmp/local.tfstate
terragrunt plan
in the new folder. This should show you all the changes that terragrunt will make to your infrastructure. This makes sense since you haven't yet migrated the terraform state and terraform therefore thinks its a new infrastructureterragrunt state push /tmp/local.tfstate
. you should notice that the command outputs successfully. At this point the state is committed to terraform remote state bucketterragrunt plan
to ensure that this time it shows No Changes
This is a test
There have been quiet a few posts on plantuml
(1, 2) and don't get me wrong I quiet liked it myself (here's one I wrote). But let's face it, the diagrams aren't pretty, and it lacks visual componants from popular platforms like AWS icons, SASS providers etc. And while you can add custom features to plantuml using stylesheets, it's really not fun.
In comes Diagrams
, a python library which is feature rich.
Here's an exmaple, lifted right out of the documentation-
from diagrams import Cluster, Diagram
When working with messaging (Queue/Topic) applications based on AWS SQS, it is often desirable to run sandbox (local development machine) at parity with the real environment. Since it is operationally challenging to create AWS SQS resources from both costing and planning perspectives, what usually ends up happening is that local instances of applications (producers and consumers) start using the same queue as those by the deployed instances (usually dev). This leads to many problems including the most obvious one where messages are processed by random listeners.
This can easily be solved by declaring conditional beans in spring and swapping the JMS provider based on properties (e.g. spring profile
)
Here's a before-
//App A (producer)
@Configuration
public class JMSConfig {
@Bean
I had to write a javascript function that on-click
of a button downloads a pdf
file and on-success
shows a message. I followed the usual pattern-
const download = (url) -> {
$(`<iframe src=${url} frameborder=0 scrolling="no" id="someid"`)
.load(() -> {
//show the success message
$(this).remove;
}).appendTo('body')
}
When setting up an enterprise CI/CD, we have to setup an artifact management platform in addition to the standard CI/CD tools like Jenkins, TeamCity, Gitlab CI etc. Unfortunately, unlike the CI/CD tools where there are a veriety of options; the artifact repository options are insanely limited, esp. if you add the additional constraint of open source.
Note that the repositories have to be private for most enterprises which rules out SaaS providers
TWL posts are fetched from the GitHub API, and the visibility of posts is based on a few parameters:
Start your post title with "TWL-Lab49/". Your post title should look something like this:
Suppose, you see a typo or logic error in a PR-
if(str == "somevalue"){
// do something
}
Clearly, this is a forgivable (some might say unforgivable) developer oversight. Generaly, we add a comment to such PRs as follows-
Logic error. Change to str.equals()
This should never show up because this is blacklisted