Skip to content

Instantly share code, notes, and snippets.

View Vetal4eg's full-sized avatar
👌
getting the right things done

Vitaliy Esaulenko Vetal4eg

👌
getting the right things done
View GitHub Profile

I upgraded to El Capitan, with Homebrew & Ruby, and this is how I did it flawlessly.

... and Xcode and Java, etc.

Prepare

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.

Hardware

@kryzhovnik
kryzhovnik / routes.rb
Created May 22, 2015 15:34
Интеграция Яндекс.Кассы с Rails
# 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
@JoshCheek
JoshCheek / rails_sib.rb
Last active February 1, 2018 16:57
Rails app in 1 file, running with Seeing Is Believing
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
@arestov
arestov / Тезисы
Last active April 27, 2017 06:32
Декларативность. Лаконичный и оптимизируемый код
Декларативность. Лаконичный и оптимизируемый код
Разделение кода сложных состояний на 3 части позволяет сильно уменьшить сложность
и объем кода (за счёт автоматизации кода, актуализирующего эти состояния,
при изменении других состояний), а также реализовывать оптимизации на системном уровне.
1) Декларативное описание того как используется результат (зачем вы что-то делаете, целеполагание)
2) Декларативное описание от каких состояний зависит результат (что нужно чтобы выполнить задачу)
3) Способ вычисления результата (как распорядится ингридиентами, чтобы получить необходимое)
@krasnoukhov
krasnoukhov / 2013-01-07-profiling-memory-leaky-sidekiq-applications-with-ruby-2.1.md
Last active October 4, 2023 21:53
Profiling memory leaky Sidekiq applications with Ruby 2.1

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"]
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

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!

Resources for Machine Learning in Ruby

Gems

@ferbass
ferbass / gist:3ecc06a8ae992365bf73
Created September 20, 2014 03:04
Xcode failed to download. Use the Purchases page to try again.
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.
@the-teacher
the-teacher / app.md
Last active November 21, 2020 19:14
Rails Mailer Yandex

Gemfile

gem 'rails_config'

config/settings/development.yml

mailer:
@Blackbaud-TitusFortner
Blackbaud-TitusFortner / headless.rb
Created July 11, 2014 18:14
Headless support in watirmark
def new_watir_browser
set_headless if config.headless
.....
end
def set_headless
begin
require 'headless'
@headless = Headless.new
@headless.start