Find USB device list on MacOS

Snippet USB MacOS

Add or remove domain to existing Letsencrypt's cert

For installation via certbot

Snippet Nginx Config SSL Letsencrypt

Adding CORS header for specific domains in Nginx

Snippet Nginx Config Security

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