I hereby claim:
- I am ikataitsev on github.
- I am ivankataitsev (https://keybase.io/ivankataitsev) on keybase.
- I have a public key ASA0ReDlw1Xu66yzVc2ct-bWZGm-KX0m8ZDB4pQf4eqqMAo
To claim this, I am signing this object:
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'sidekiq' | |
require 'sidekiq/cli' | |
# Default to running one process per core | |
def process_count | |
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0 | |
case RbConfig::CONFIG['host_os'] |
#!/usr/bin/env ruby | |
require 'sidekiq' | |
require 'sidekiq/cli' | |
# Default to running one process per core | |
def process_count | |
return ENV['SK_PROCESS_COUNT'].to_i unless ENV['SK_PROCESS_COUNT'].to_i == 0 | |
case RbConfig::CONFIG['host_os'] |
/home/ikataitsev/courier/shared/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187: [BUG] Segmentation fault at 0x00000000000000 | |
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0005 p:---- s:0017 e:000016 CFUNC :run_machine | |
c:0004 p:0267 s:0014 e:000013 METHOD /home/ikataitsev/courier/shared/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187 | |
c:0003 p:0013 s:0007 E:001848 METHOD lib/pusher.rb:11 | |
c:0002 p:0080 s:0004 E:001778 EVAL lib/pusher.rb:43 [FINISH] | |
c:0001 p:0000 s:0002 E:000148 TOP [FINISH] |
require 'active_record' | |
require 'yaml' | |
require 'mysql' | |
require 'logger' | |
task :default => :migrate | |
desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x" | |
task :migrate => :environment do | |
ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil ) |
- http://tools.ietf.org/html/rfc2616#section-13 | |
- http://tomayko.com/writings/things-caches-do | |
- http://www.mnot.net/cache_docs/ |
class Activity < ActiveRecord::Base | |
# Activity#result is a boolean | |
end | |
# Let's say | |
Activity.all.pluck(:result) # => [false, true, false, false, false, true] | |
# How can I calculate the number of the false results before that true one? |