Hello World
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.1" xmlns:feeder="https://nononsenseapps.com/feeder"> | |
| <head> | |
| <title> | |
| Feeder | |
| </title> | |
| </head> | |
| <body> | |
| <outline title="Companies" text="Companies"> | |
| <outline feeder:notify="false" feeder:imageUrl="https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png" feeder:fullTextByDefault="false" feeder:openArticlesWith="" feeder:alternateId="false" title="The Netflix Tech Blog" text="The Netflix Tech Blog" type="rss" xmlUrl="http://techblog.netflix.com/feeds/posts/default"/> |
Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
This file contains hidden or 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 | |
| rm *.jks 2> /dev/null | |
| rm *.pem 2> /dev/null | |
| echo "====================================================" | |
| echo "Creating fake third-party chain root -> ca" | |
| echo "====================================================" | |
| # generate private keys (for root and ca) |
This file contains hidden or 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
| spring: | |
| application: | |
| name: sample | |
| profiles: | |
| active: dev | |
| cloud: | |
| gateway: | |
| actuator: | |
| verbose: | |
| enabled: false |
This file contains hidden or 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
| // Debug into the class | |
| // org.springframework.beans.factory.support | |
| // DefaultSingletonBeanRegistry | |
| // method | |
| // public Object getSingleton | |
| try { | |
| singletonObject = singletonFactory.getObject(); | |
| // add condition 'beanName.indexOf("routesConfig") >= 0' |
This file contains hidden or 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
| 'routes.yml' are more properties for Spring Cloud Gateway, for example. | |
| VM options add: | |
| -Dspring.config.additional-location=file:config/routes.yml | |
| @Configuration | |
| class ExtraConfig() { | |
| @Bean | |
| fun extraBean( |
This file contains hidden or 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
| fun toInstant(input: OffsetDateTime): Instant? { | |
| return input.atZoneSameInstant(ZoneOffset.UTC).toInstant() | |
| } | |
| toInstant(OffsetDateTime.of(2021, 12, 31,0,0,0,0, ZoneOffset.UTC)) |
This file contains hidden or 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
| import static org.junit.Assert.assertThat; | |
| import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasKey; | |
| import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue; | |
| import static org.springframework.kafka.test.utils.KafkaTestUtils.getSingleRecord; | |
| import java.util.Map; | |
| import org.apache.kafka.clients.consumer.Consumer; | |
| import org.apache.kafka.clients.consumer.ConsumerConfig; | |
| import org.apache.kafka.clients.consumer.ConsumerRecord; | |
| import org.apache.kafka.common.serialization.Deserializer; |
This file contains hidden or 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
| export async function asyncForEach<T>(array: Array<T>, callback: (item: T, index: number) => void) { | |
| for (let index = 0; index < array.length; index++) { | |
| await callback(array[index], index); | |
| } | |
| } |
NewerOlder