Skip to content

Instantly share code, notes, and snippets.

View pat's full-sized avatar
🇵🇸
free Palestine 🇵🇸

Pat Allan pat

🇵🇸
free Palestine 🇵🇸
View GitHub Profile
@pat
pat / parallel_processor.rb
Last active August 21, 2019 12:28
Thinking Sphinx parallel processing of real-time indices.
# This will process each real-time index in parallel (using separate
# processes, up to the number of CPUs available).
#
# You will also need the 'parallel' gem, and what is currently the
# edge release of Thinking Sphinx (until there's been a release after
# v4.3.2).
#
# This could all go in an initialiser, or put the class wherever you
# like, and the assignment in the initialiser.
@pat
pat / minutes.markdown
Last active May 21, 2019 12:31
Ruby Australia Special General Meeting - 12th May 2019

Attendees

  • Pat Allan
  • Mark Glossop
  • Rebecca Le
  • Celia Colquhoun King
  • Steven Webb
  • Nimeshe Madanayake
  • Vanessa Nimmo
  • Lauren Hennessy

To Whom It May Concern

RE: Telecommunication and Other Legislation Amendment (Assistance and Access) Act 2018

Ruby Australia is an industry body representing software developers who use the Ruby programming language across a range of businesses, industries, products and projects, and across Australia.

On behalf of our members generally (and specifically those who have supplied their signatures) we strongly condemn the Telecommunications and Other Legislation Amendment (Assistance and Access) Act 2018, which has recently passed both houses of Parliament.

The Act was hurried through without any serious consideration for industry concerns, and has a worrying lack of oversight. It shows a severe lack of technological understanding, no respect for citizens' privacy, nor any serious appreciation for digital security. And through its existence, it tars our entire profession. Because of what our Government may insist of us, our international peers and customers can no longer trust us or our products with their ow

@pat
pat / rubyconf-au-eoi-2020.markdown
Created January 20, 2019 22:44
RubyConf AU 2020 - Seeking Expressions of Interest

Ruby Australia

Seeking expressions of interest for RubyConf AU 2020

Expressions Required By: February 18th 2019.

One of the flagship events of the Australian Ruby community's calendar is RubyConf AU, which has been occurring annually since 2013. The Ruby Australia committee is seeking expressions of interest from people in the community to run the 2020 edition of the conference.

To support conference organisers, Ruby Australia offers event insurance and financial backing courtesy of previous events and sponsors. Also, previous organisers will be able to provide wisdom and suggestions from their past experiences, previous budgets, connections to vendors, suggested speakers to invite, and other general advice.

@pat
pat / LICENSE.txt
Last active February 4, 2023 21:02
Running Setup SQL scripts on an RDS instance within a VPC, via Terraform
The MIT License (MIT)
Copyright (c) 2018 Pat Allan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@pat
pat / Rakefile
Created July 25, 2018 03:29
Using ActiveRecord in a Rake-based application
require "bundler/setup"
load "active_record/railties/databases.rake"
task :environment do
require "./config/application"
require "my_app"
end
@pat
pat / thinking_sphinx.yml
Last active April 23, 2022 03:49
Thinking Sphinx Configuration
# Extended configuration for Thinking Sphinx can be stored in the
# config/thinking_sphinx.yml file within your application (this file was
# previously known as config/sphinx.yml in TS v1/v2).
#
# Many settings from Sphinx itself can be set here, and they'll flow through to
# the appropriate section of the generated configuration. However, some are
# used for Thinking Sphinx behaviour, and so those are documented here first.
#
# Configuration is grouped by environment, just like config/database.yml in a
# standard Rails application.

Major Features and Changes

Thinking Sphinx v4.0 has been in development for a little while, and includes some significant changes (as befitting a major release):

Merging Indices

Merging indices is now supported via the new ts:merge rake task. This is useful when you're using delta indices as an alternative to running ts:index regularly to have new/changed records populated into the core indices. Merging should be reliably faster (and it avoids hitting your database to reprocess all the records).

Running ts:index every now and then to catch any records changed/modified without callbacks is probably wise (perhaps once a day compared to more frequent ts:merge calls).

@pat
pat / .rubocop.yml
Last active April 21, 2021 09:38
Shared Personal Rubocop configuration.
AllCops:
TargetRubyVersion: 2.5
Exclude:
- 'db/schema.rb'
- 'vendor/**/*'
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Layout/DotPosition:

Hullo London and (relatively) near-London friends,

I'm passing through town for a few days - arriving on the 8th of November, departing early on the 11th. I'd love to catch up with as many of you as possible, though I know that's not a small ask and it is a small timeframe. Still, if it can work out… the best times to grab me are as follows (and I'm happy to traipse around London to meet you as time permits):

  • The evening of the 8th for dinner
  • During the day on the 9th and 10th for coffee or lunch
  • An early dinner on the 10th

I'm seeing the excellent and yet hard to pigeonhole band Lake Street Dive on the 10th, and I actually have ended up with two spare tickets. So, if you like the sound of them, I'd love for you to join me! :)