My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
| @Service | |
| public class MailSenderService { | |
| private JavaMailSender javaMailSender; | |
| @Autowired | |
| public MailSenderService(JavaMailSender javaMailSender) { | |
| this.javaMailSender = javaMailSender; | |
| } | |
| jdempotent: | |
| enable: true #if you want to disable `Jdempotent`, you can set as false | |
| cache: | |
| redis: | |
| database: 9 | |
| password: pass | |
| sentinelHostList: localhost | |
| sentinelPort: 26379 | |
| sentinelMasterName: master | |
| expirationTimeHour: 2 |
| @Service | |
| public class WelcomingListener { | |
| @Autowired | |
| private MailSenderService mailSenderService; | |
| private static final Logger logger = LoggerFactory.getLogger(WelcomingListener.class); | |
| @Value("${template.welcoming.message}") | |
| private String message; | |
| curl --location --request POST 'localhost:8080/send-email' \ | |
| --header 'Content-Type: application/json' \ | |
| --data-raw '{ | |
| "email": "mehmet.ari@gmail.com", | |
| "subject": "TEST", | |
| "message": "TEST" | |
| }' |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.
- List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describeNote the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
- Reset the consumer offset for a topic (preview)
The following recipes are sampled from a trained neural net. You can find the repo to train your own neural net here: https://github.com/karpathy/char-rnn Thanks to Andrej Karpathy for the great code! It's really easy to setup.
The recipes I used for training the char-rnn are from a recipe collection called ffts.com And here is the actual zipped data (uncompressed ~35 MB) I used for training. The ZIP is also archived @ archive.org in case the original links becomes invalid in the future.