Convert equirectangular panorama image into pannellum supported multi-resolution image

To support higher resolution 360 images on mobile device

Snippet Pannellum Panorama Image 360

Dynamically supply SMTP config in Rails

For multi-tenants system or user editable SMTP config

Snippet Rails ActionMailer SMTP

Read YAML file in Java

Convenience way to set configuration

Snippet Java YAML Jackson

Increase file descriptor for RabbitMQ

For ubuntu 16.04

Snippet Ubuntu RabbitMQ Config

Install new version of Ruby via rbenv

For mac and homebrew & For ubuntu

Snippet Ruby rbenv

Rails API Authentication

None, Basic, Token and ApiKey Authentication

Snippet Rails Authentication API

Integrate Google Sign-In

Using Google OAuth2 with Omniauth

Snippet Ruby Google Oauth2 Omniauth

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

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