Send email asynchroniously using Sidekiq.
Create your mailer us usual:
app.config ($provide) -> | |
$provide.decorator 'dateFilter', ($delegate) -> | |
(date, format, timezone) -> | |
$delegate.call this, date, format, if timezone then timezone else 'UTC' |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
# In spec_helper.rb | |
RSpec.configure do |config| | |
.... | |
rubocop_output = `rubocop` | |
print rubocop_output | |
fail "RuboCop Errors" unless rubocop_output.match(/files inspected, no offenses detected/) | |
end |
class Api::BaseController < ApplicationController | |
include Rivalry::OrganizationScope | |
respond_to :json | |
private | |
def self.paginated_action(options = {}) | |
before_filter(options) do |controller| | |
if request.headers['Range-Unit'] == 'items' && | |
request.headers['Range'].present? |
stats = Sidekiq::Stats.new | |
stats.queues | |
stats.enqueued | |
stats.processed | |
stats.failed |
angular.module('ClientSuccess.services').factory 'fileService', (authService, $q, $rootScope)-> | |
service = {} | |
service.uploadAvatar = (file) -> | |
deferred = $q.defer() | |
apiAuth = authService.enableAuth() | |
query = | |
binary: null | |
id: null | |
postIt = () -> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class PHPass | |
def self.itoa64 | |
'./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' | |
end | |
def self.crypt_private(password, setting) | |
output = '*0' | |
if setting[0,2] == output |