Skip to content

Instantly share code, notes, and snippets.

@pezra
Created May 18, 2009 21:39
Show Gist options
  • Save pezra/113764 to your computer and use it in GitHub Desktop.
Save pezra/113764 to your computer and use it in GitHub Desktop.
(1..143671).step(100) do |n|
puts "working on block #{n}"
Subscriber.find(:all, :conditions => ["id between ? and ?", n, n+100], :limit => 100).each do |s|
next unless s.card_number
if ['8714', '0436', '0704', '4008'].include?(s.card_number[-4,4])
puts "#{s.id} #{s.card_number}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment