- GoogleChrome
- MacBook
- MacOS
- tachpad
- size
- retina screen
- battery uptime
- провод питания с магнитом
I upgraded to El Capitan, with Homebrew & Ruby, and this is how I did it flawlessly.
... and Xcode and Java, etc.
If you don't already have homebrew installed, do that first, so you don't have to deal with SIP issues. Install all Software Updates available in the Apple Menu, up to and including El Capitan.
# config/routes.rb | |
YandexKassaIntegration::Application.routes.draw do | |
# ... | |
scope '/yandex_kassa' do | |
controller 'yandex_kassa', constraints: { subdomain: 'ssl' } do | |
post :check | |
post :aviso | |
get :success | |
get :fail |
gem 'rails', '4.2.1' # prob works on others, too, but this is the one I figured it out on | |
require "rails" | |
require 'active_record' | |
require 'action_controller/railtie' | |
require 'action_view/railtie' | |
# ===== Configuration ===== | |
Rails.logger = ActiveRecord::Base.logger = Logger.new $stdout | |
ActiveSupport::LogSubscriber.colorize_logging = false |
Декларативность. Лаконичный и оптимизируемый код | |
Разделение кода сложных состояний на 3 части позволяет сильно уменьшить сложность | |
и объем кода (за счёт автоматизации кода, актуализирующего эти состояния, | |
при изменении других состояний), а также реализовывать оптимизации на системном уровне. | |
1) Декларативное описание того как используется результат (зачем вы что-то делаете, целеполагание) | |
2) Декларативное описание от каких состояний зависит результат (что нужно чтобы выполнить задачу) | |
3) Способ вычисления результата (как распорядится ингридиентами, чтобы получить необходимое) |
My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.
As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.
I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.
So, in order to profile your worker, add this to your Sidekiq configuration:
if ENV["PROFILE"]
UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
Steps: | |
Open Terminal. | |
Run the following command: | |
defaults write com.apple.appstore ShowDebugMenu -bool true | |
Relaunch the App Store. | |
Choose the menu item Debug → Reset Application. |
Gemfile
gem 'rails_config'
config/settings/development.yml
mailer:
def new_watir_browser | |
set_headless if config.headless | |
..... | |
end | |
def set_headless | |
begin | |
require 'headless' | |
@headless = Headless.new | |
@headless.start |