Skip to content

Instantly share code, notes, and snippets.

View stephenrichards's full-sized avatar

Stephen Richards stephenrichards

  • Ministry of Justice
  • London
View GitHub Profile
fee_type_ids = Fee::BaseFeeType.where('description like ?', '%uplift%').where.not(id: [8,9,26,90]).pluck(:id)
claim_ids = Fee::BaseFee.where(fee_type_id: fee_type_ids).where.not(amount: 0.0).pluck(:claim_id)
submitted_claim_ids = Claim::BaseClaim.where(id: claim_ids).where(state: ['authorised', 'part_authorised']).order(id: :desc)
@stephenrichards
stephenrichards / gist:5851607f3a19b3bb1c07
Created December 17, 2014 12:36
ruby script to download http pages with all assets (including 404, 500, etc)
#!/usr/bin/env ruby
# faux-wget.rb : example of performing wget-style mirroring
require 'nokogiri'
require 'net/http'
require 'fileutils'
require 'uri'
require 'pp'
=begin rdoc