Skip to content

Instantly share code, notes, and snippets.

View memojja's full-sized avatar
🎯
Focusing

Mehmet Arı memojja

🎯
Focusing
View GitHub Profile
@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;
@memojja
memojja / send-email.curl
Last active December 22, 2020 11:02
send post
curl --location --request POST 'localhost:8080/send-email' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "mehmet.ari@gmail.com",
"subject": "TEST",
"message": "TEST"
}'
@memojja
memojja / cheatsheet-elasticsearch.md
Created May 4, 2021 10:25 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note 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.

  1. Reset the consumer offset for a topic (preview)

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@memojja
memojja / char-rnn recipes.md
Created February 26, 2023 08:12 — forked from nylki/char-rnn recipes.md
char-rnn cooking recipes

do androids dream of cooking?

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.