Skip to content

Instantly share code, notes, and snippets.

V. busy with Ably, building a great team 🚀

Matthew O'Riordan mattheworiordan

V. busy with Ably, building a great team 🚀
View GitHub Profile
mattheworiordan / publish-with-idempotency-for-retries.js
Created Apr 18, 2019
Ably Idempotency for automatic retries by our SDKs
View publish-with-idempotency-for-retries.js
var rest = new Ably.Rest(key: ablyApiKey, idempotentRestPublishing: true);
var channel = rest.channels.get('example-channel');
channel.publish([{ data: 'payload' }]);
mattheworiordan / publish-with-client-supplied-id.js
Last active Apr 18, 2019
Ably Idempotency with client supplied message ID
View publish-with-client-supplied-id.js
var rest = new Ably.Rest(ablyApiKey);
var channel = rest.channels.get('example-channel');
channel.publish([{ data: 'payload', id: 'unique123' }]);
View corporate-cla.txt
Thank you for your interest in Open SDSP (the
"Open Specification") and Ably Real-time Ltd (the "Project Sponsor").
In order to clarify the intellectual property license granted with
Contributions from any person or entity, the Project Sponsor
must have a Contributor License Agreement (CLA) on file that has been
signed by each Contributor, indicating agreement to the license terms
below. This license is for your protection as a Contributor as well
as the protection of the Project Sponsor and its users; it does not
change your rights to use your own Contributions for any other purpose.
mattheworiordan /
Last active Nov 26, 2018
Recommend a distributed system engineer we employ and earn yourself $3,000

Unfortunately we're finding it really hard to find good distributed systems engineers at Ably, a distributed realtime data delivery platform.

We know a lot of you out there probably know great people who love solving truly hard distributed problems with a distributed team of superb engineers.

If you know anyone who fits the bill, wants to work remotely and is based in Europe (or wants to work on-site in London), we'll give you $3,000 simply for the referral if we end up employing them.

Follow these steps to earn $3,000 for one minute of your time:

  1. Contact the people you think are suitable for our Distributed Systems Engineer role and tell them to apply on that page
  2. Email us at with the name or
mattheworiordan /
Created Aug 19, 2017
Heroku scheduled restarts
# Set up the Heroku scheduler to run this command every hour. See example setup at
# Requires env vars to be set in Heroku with `heroku config:set`:
# - HEROKU_APP_NAME: this is just the app name in Heroku, i.e. `heroku apps` will list all apps you have access to
# - HEROKU_CLI_USER: Once Heroku CLI is authenticated (, check `cat .netrc` (or `_netrc` on Windows),
# look for `login` under `machine`
# - HEROKU_CLI_TOKEN: As above, but use the `password` field
mattheworiordan / consume-bunny.rb
Created Feb 3, 2017
Consume Reactor Queues from Ruby
View consume-bunny.rb
require "bunny"
require "json"
require "securerandom"
QUEUE = "appId:queue"
VHOST = 'shared'
def consume
consumer_conn =
hostname: "",
#!/usr/bin/env python
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
View gist:278e5628ec635466d8abfb8c81b2b18c
Europe - Andorra
Asia - Dubai
Asia - Kabul
America - Antigua
America - Anguilla
Europe - Tirane
Asia - Yerevan
Africa - Luanda
Antarctica - McMurdo
Antarctica - Casey
mattheworiordan / channel-attach-example.js
Last active Jul 12, 2016
v0.8 channel attach example
View channel-attach-example.js
function reattach(channel) {
/* Example when using presence on the channel */
/* Connection state changes can trigger channels to become detached
Automatically re-attach channels, nothing will happen if already attached */
client.connection.on('connected', function() {
for (let channelName in client.channels.all) {
mattheworiordan / messages.js
Last active Mar 25, 2016
actioncable messages
View messages.js
/* Published message from client following a call to @perform, see */
/* Published message from client following a call to @perform, see */
{count: "2", broadcastAt: 1458940410054.843}
/* No ACK/NACK for the published message, how do you know it arrived? */