Send email asynchroniously using Sidekiq.
Create your mailer us usual:
class Post < ActiveRecord::Base | |
# for SO: http://stackoverflow.com/questions/10481389/friendly-id-with-two-parameters | |
# EXAMPLE ASSUMES YOU ARE USING FRIENDLYID 4.X | |
# AND THAT YOU HAVE A SLUG:STRING COLUMN ON THE MODEL | |
# ... | |
extend FriendlyId | |
friendly_id :generate_custom_slug, :use => :slugged | |
# ... |
using System; | |
using System.Security.Cryptography; | |
using System.Web; | |
namespace DevPartners | |
{ | |
// author: Bill Wilder, @codingoutloud | |
// original: https://gist.github.com/4200537 | |
public static class RandomTokenGenerator | |
{ |
group :development do | |
gem 'quiet_assets' # Remove useless logs | |
# Debugging in the browser | |
gem 'better_errors' | |
gem 'binding_of_caller' | |
gem 'meta_request' | |
gem 'guard-livereload' | |
gem 'seed_dump' |
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
#!/bin/sh | |
# | |
# Check for ruby style errors | |
red='\033[0;31m' | |
green='\033[0;32m' | |
yellow='\033[0;33m' | |
NC='\033[0m' | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
import React, { Component } from 'react'; | |
import ActionCable from 'actioncable'; | |
class App extends Component { | |
componentWillMount() { | |
var cable = ActionCable.createConsumer('ws://localhost:3000/cable') |
# Created by .ignore support plugin (hsz.mobi) | |
### Python template | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so |