Skip to content

Instantly share code, notes, and snippets.

View conorh's full-sized avatar

Conor Hunt conorh

View GitHub Profile
@conorh
conorh / ransack.md
Created November 10, 2023 23:15 — forked from raghubetina/ransack.md
Ransack Cheatsheet

Ransack Cheatsheet

The Ransack gem provides us with a powerful, flexible, easy-to-integrate search/filter form.

Installation

In your Gemfile, include

gem 'ransack'
@conorh
conorh / gist:780ff75a5d59e242856e69d97feb6720
Last active September 14, 2018 01:52 — forked from shock/gist:120186
Find bloating passengers and kill them gracefully.
#!/usr/bin/env ruby
#
# Find bloating passengers and kill them gracefully. Run from cron every minute.
#
# required for passenger since cron has no environment
ENV['HTTPD'] = 'httpd'
MEM_LIMIT = ARGV[0] || 500
find . -name ".git" -exec rm -rf {} \;