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
# I've been troubleshooting an issue that cropped up in our app when we upgraded from | |
# rails 4.1 to 4.2. We make heavy use of the 'paranoia' gem to allow for soft-deleting | |
# records via a deleted_at attribute. The gem uses default scopes that exclude | |
# `deleted_at: nil` records from default queries. | |
# | |
# In our join tables, we unscope the belongs_to relation because once the app has found | |
# its way to a record in the join table, it expects to be able to see the joined | |
# records, even if those records have been deleted. | |
# | |
# Starting with Rails 4.2.4, it appears that this unscope on the belongs_to unexpectedly |
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
# from https://github.com/rspec/rspec-rails/issues/1353 | |
# put this in spec/initializers/debug_hangs.rb, then use 'kill -USR1 <rspec-pid>' when rspec hangs | |
puts "rspec pid: #{Process.pid}" | |
trap 'USR1' do | |
threads = Thread.list | |
puts | |
puts '=' * 80 |
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
#!/bin/sh | |
# | |
# processname: nginx | |
# config: /opt/nginx/conf/nginx.conf | |
# pidfile: /opt/nginx/logs/nginx.pid | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
# Source networking configuration. |