Skip to content

Instantly share code, notes, and snippets.

Pat Allan pat

Block or report user

Report or block pat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kms_placeholder.rb
require "openssl"
require "digest/sha2"
require "base64"
require "ostruct"
# Just like Aws::KMS::Client, this responds to decrypt and encrypt,
# using the same parameters and output objects (well, at least for
# the purposes of what I've used it for).
# So, you can inject this class in instead for test environments
View monolith.plugin.zsh
function ruby_files() {
xargs ls -1 2>/dev/null | grep '\.rb$'
function spec_files() {
xargs ls -1 2>/dev/null | grep '_spec\.rb$'
function uncommitted() {
# first command is staged changes, second is new files and unstaged changes
pat / parallel_processor.rb
Last active Aug 21, 2019
Thinking Sphinx parallel processing of real-time indices.
View parallel_processor.rb
# 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 / minutes.markdown
Last active May 21, 2019
Ruby Australia Special General Meeting - 12th May 2019
View minutes.markdown


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

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 / rubyconf-au-eoi-2020.markdown
Created Jan 20, 2019
RubyConf AU 2020 - Seeking Expressions of Interest
View rubyconf-au-eoi-2020.markdown

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 / LICENSE.txt
Last active Sep 16, 2019
Running Setup SQL scripts on an RDS instance within a VPC, via Terraform
View LICENSE.txt
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 / Rakefile
Created Jul 25, 2018
Using ActiveRecord in a Rake-based application
View Rakefile
require "bundler/setup"
load "active_record/railties/databases.rake"
task :environment do
require "./config/application"
require "my_app"
pat / thinking_sphinx.yml
Last active Jul 7, 2018
Thinking Sphinx Configuration
View thinking_sphinx.yml
# 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.
View thinking-sphinx-v4.0.0.markdown

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).

You can’t perform that action at this time.