Send email asynchroniously using Sidekiq.
Create your mailer us usual:
$('.checkbox_like_radio').on('click', 'input[type="checkbox"]', function() { | |
$(this) | |
.closest('.checkbox_like_radio') | |
.find('input[type="checkbox"]') | |
.not(this) | |
.prop('checked', false); | |
}); |
$('.radio_with_uncheck').on('click', 'input[type="radio"]', function() { | |
var $radio = $(this); | |
var group = $('input[name="' + this.name + '"]'); | |
if ($radio.prop('checked') && $radio.data('was-checked')) { | |
$radio.prop('checked', false); | |
} | |
group.data('was-checked', false); | |
$radio.data('was-checked', $radio.prop('checked')); |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |
(function (d, w, c) { | |
(w[c] = w[c] || []).push(function () { | |
try { | |
w.yaCounter99999999 = new Ya.Metrika({ | |
id: 99999999, | |
clickmap: true, | |
trackLinks: true, | |
accurateTrackBounce: true, | |
webvisor: true | |
}); |
class Api::BaseController < ApplicationController | |
protect_from_forgery with: :null_session | |
rescue_from ActiveRecord::RecordNotFound, with: :not_found | |
before_action :destroy_session | |
before_action :authenticate_with_token! | |
def current_user | |
@current_user ||= find_user | |
end |
[Unit] | |
Description=My app | |
After=network.target, postgresql.service | |
[Service] | |
Type=forking | |
User=deploy | |
Environment=RAILS_ENV=production | |
Environment=RUBYOPT='-W0' | |
PIDFile=/home/deploy/apps/app_name/shared/tmp/pids/puma.pid |
git status --porcelain | cut -c4- | grep '.rb' | xargs rubocop |
@echo off | |
CLS | |
:MENU | |
ECHO. | |
ECHO ----------------- | |
ECHO Press 1, 2, 3, 4 or 5 to select your task, or 6 to Exit. | |
ECHO ----------------- | |
ECHO. | |
ECHO 1 - Set Wifi Sharing Attributes | |
ECHO 2 - Start WiFi Sharing |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |