Handling weekdays, weekends and public holidays

By using various built-in methods in Ruby and Rails

Snippet Ruby Rails Date Time

Use .gitignore to prevent committing unwanted files

Logs, temporary files, credentials are not supposed to be committed into git repository

Snippet Ruby Git Gitignore Android

Deploying Java app as daemon

Via systemd or init.d

Snippet Java Jar Upstart Systemd Deployment

Reconstruct query string from request

For string compare or generate signature hash

Snippet Ruby Rails Controller

Preview ActionMailer email content

Without actually sending out the email

Snippet Rails ActionMailer Test

Avoiding table name conflict when multiple delayed job accessing the same database

When you have multiple apps connecting to the same database

Snippet Rails Delayed Job Database

Rails SMTP setting without authentication

A common mistake to remove SMTP authentication

Snippet Rails SMTP

Test rails mailer with RSpec

Functional and Spec testing

Snippet RSpec Rails Mailer Test ActionMailer

Load SMTP setting dynamically

From database or user's input

Snippet Rails Email SMTP

Using a custom config file

Store application specific configuration in a custom config file

Snippet Rails Config

Share a private S3 object

Via temporary presigned URL

Snippet AWS S3 Ruby SDK

Uploading text string or file to S3

Via AWS Ruby SDK v2

Snippet AWS S3 Ruby SDK

Convert p12 cert to pem format

Ruby, Openssl, pkcs12, apns, pem

Snippet P12 Convert PEM Cert

Open graph tags for Facebook

Define how Facebook crawler sees your page and how your page looks like as a post on Facebook

Snippet Facebook Meta Open graph SEO

SPF validation for your mail server

Add SPF entry in your DNS records to authorize a mail server

Snippet Email SEO Security DNS