Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.assets.js_compressor = :uglifier | |
config.assets.css_compressor = :sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArticleImageUploader < ImageUploader | |
process :fix_exif_rotation | |
process :strip | |
process :convert => 'jpg' | |
process :quality => 85 # Percentage from 0 - 100 | |
version :gallery_thumb do | |
process :resize_to_fill => Settings.images.article_images.processing.gallery_thumb #44x44 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/User.rb | |
#As we all know that Devise sends all emails through the send_devise_notification method | |
#So, without having to install devise-async gem , we just need to change the code to send it asynchronously | |
# send to the delayed_job queue | |
def send_devise_notification(notification, *args) | |
devise_mailer.delay.send(notification, self, *args) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RedisHelper | |
# decode Redis value back to Ruby object | |
def self.decode(json) | |
self.new(ActiveSupport::JSON.decode(json)["#{self.name.downcase}"]) | |
end | |
# encode Ruby object for Redis | |
def encoded | |
self.updated_at = nil | |
self.to_json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Admin::UsersController < ApplicationController | |
before_filter :authenticate_user! | |
before_filter :check_if_admin | |
include Pundit | |
def index | |
@users = User.all | |
end | |
def update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
# default gems here | |
#--------------------------- | |
# add paperclip and bootstrap | |
gem "paperclip", "~> 4.1" | |
gem 'bootstrap-sass', '~> 3.1.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R `whoami` /usr/local | |
cd /usr/local | |
git reset --hard origin/master | |
brew doctor |
OlderNewer