Skip to content

Instantly share code, notes, and snippets.

{
"basics": {
"name": "Paul Leader",
"label": "",
"picture": "",
"email": "[email protected]",
"phone": "07866584908",
"website": "https://paulleader.co.uk",
"summary": "A software engineer with broad experience, from web and Internet systems, to high integrity embedded software. Able to mix modern tools and technologies with a solid grounding in theory and formal techniques. A pragmatic problem solver with a belief in producing quality software through the use of lightweight processes and a systematic approach. Keen user of new tools and techniques when they are the right solution to the problem at hand, but with an appreciation of the trade-offs inherent in using anything new. An active participant in the local tech community, organiser of the long-running BathCamp tech events, and one of the organisers of the 2018 Bath Ruby Conference.",
"location": {

Keybase proof

I hereby claim:

  • I am paulleader on github.
  • I am paulleader (https://keybase.io/paulleader) on keybase.
  • I have a public key whose fingerprint is 5C86 AAA7 508C 851F 0296 74B8 25C2 0647 47E4 E677

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am paulleader on github.
  • I am paulleader (https://keybase.io/paulleader) on keybase.
  • I have a public key whose fingerprint is 9538 888A E695 F68E 0477 E08B 639A C21B FD82 99BA

To claim this, I am signing this object:

@paulleader
paulleader / gist:2835342
Created May 30, 2012 10:22
Facet count for an arbitrary dimension on the results of a search, uses #where_values
def facet_count(facet)
# Work out some useful strings.
facet_table = facet.table_name
facet_sym = facet_table.to_sym
facet_id_name = facet.name.foreign_key
# Build the base query in terms of the
# model being used to facet the results.
#
# We join to Company as that is used to filter