Skip to content

Instantly share code, notes, and snippets.

@theirishpenguin
theirishpenguin / Masters Opportunity on Gaming and Its Use in Youth Work
Last active August 29, 2015 14:22
Masters Opportunity on Gaming and Its Use in Youth Work
### Masters Opportunity on Gaming and Its Use in Youth Work ###
Just circulating an opportunity to do a Masters to investigate the use of multiplayer online games as a means of engaging young people in youth work. It's a scholarship with the fees for 2 years paid and a stipend to the value of 6000 euro per annum provided.
*** The closing date for applications is soon - 12th June ***
The Masters will be done via the Limerick Institute of Technology, in partnership with Tipperary Regional Youth Services, who are looking for someone with either skills in youth work and interest in gaming, or skills in gaming/programming with an interest in youth work.
More details and candidate requirements at http://bit.ly/1JnLPNM
Ya, there are a few good interactor based gems floating around, including collectiveideas. I usually just apply the basic pattern discussed at https://www.youtube.com/watch?v=WpkDN78P884 ie. instead of object 1 and 2 talking to each other, introduce a third object to facilitate the communication. So this can be a Service object, or just another object.
I guess if that third object isn't quite at the Service level it's just another object - ie. in the case of an Interactor that depends on another Interactor, the top-level Interactor is a Service Object and the lower level Interactor is just another object. This scenario isn't common but by not assuming that every Interactor is a Service Object you reserve the right to do keep applying this technique to simplify code in a complex scenario.
So introducing a higher-level third object helps solve fat controllers/models in Rails, which would otherwise be too tightly coupled to each other and harder to test. And introducing a higher-level third object helps solve
@theirishpenguin
theirishpenguin / backbone-paginator-2.0.2-penguin1.js
Created December 15, 2014 15:18
backbone-paginator-2.0.2-penguin1
/*
backbone.paginator 2.0.0
http://github.com/backbone-paginator/backbone.paginator
Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
Licensed under the MIT @license.
*/
(function (factory) {
@theirishpenguin
theirishpenguin / raffle.rb
Created August 25, 2014 08:18
A simple script to run a raffle, reading in from a CSV file of contestants
# quick-and-dirty Ruby script to raffle a prize
# author: Kevin Noonan.
# modified for suspense by theirishpenguin :)
#
# State in advance: attendance at the event is mandatory to be
# eligible for the prize-draw.
# If someone who's not attending is randomly chosen, re-run the script.
#
# (The list below has *all* Ruby Ireland members, at least on Meetup
# as at 15th April 2013.)
@theirishpenguin
theirishpenguin / wide-github-diffs.js
Last active December 20, 2015 05:39
Wide Github Diffs
$('div.site div.container')[1].style.width='95%';var div=$('div#js-repo-pjax-container')[0];div.style.width='95%';
@theirishpenguin
theirishpenguin / ssd-dd-benchmark
Created November 11, 2012 11:10
Simple benchmark for your SSD. Takes into account alignment of your disks
#!/bin/bash
# Based on the dd test script at https://wiki.archlinux.org/index.php/SSD_Benchmarking
# Disclaimer: Use at your own risk. This program comes with no warranty.
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2 # in order for the drop_caches command to work
exit 1
fi
@theirishpenguin
theirishpenguin / gist:4039750
Created November 8, 2012 16:07
Global Code Retreat
A short summary of the day; starts early, around 8.30, there are 6 or
7 iterations of 45 minutes each, trying to solve Conway's Game of Life
(http://en.wikipedia.org/wiki/Conway's_Game_of_Life). All iterations
are in pairs (one computer), and the language is chosen by the pair.
At the end of the 45 minutes you have to DELETE all your code, stand
up for a 5 minutes group retrospective (in which we ask uncomfortable
questions if no one speaks up), and then a 10 minute break to grab
some coffee and find a new partner for the next iteration. Each
iteration will have some additional rules (things like, no if
statements allowed, or applying 'tell don't ask', depending on the
@theirishpenguin
theirishpenguin / prettify_json.rb
Created October 12, 2012 16:58
Simple ruby script to take a json file and output it in a nicely indented format
#! /usr/bin/env ruby
require 'json'
unless ARGV.length == 1
puts "
Usage: prettify_json.rb path/to/file.json
It's simple! It is strongly recommended that you redirect any errors to an
error.txt file (to make them easy to read) as follows...
@theirishpenguin
theirishpenguin / irssi-libnotify-plugin-ubuntu-installer.sh
Created October 11, 2012 13:46
irssi libnotify installer for ubuntu
#!/bin/bash
# This is a wrapped up version of the instructions at
# http://code.google.com/p/irssi-libnotify/wiki/MainPage for ubuntu
#
# Usage: Just run this script from the command line with no arguments
#
# Tested on Ubuntu 12.04.1 (64 bit)
echo ""
@theirishpenguin
theirishpenguin / SpreeConf 2012
Created August 3, 2012 13:39
The super conf for developers this August in Dublin
It's been a while since the last blog post (almost becoming an annual publication) and I'm in the process of moving theirishpenguin.com - hence this gist - but I felt inspired to write about an amazing event coming up this month, now that we've hit August. It's SpreeConf Europe, it's happening in Dublin and it has a star-studded lineup from round the world!
It kicks of on the 22nd of August in the Guinness Storehouse (http://www.guinness-storehouse.com) and lasts for two fabulous days of tech talk that cover a range of topics, that will appeal to a general developer audience. Talks featuring Javascript, Backbone, Rails as well as e-commerce will be to the fore. As will, of course, Spree Commerce itself which, over the last year and a half, has grown to be one of the most prominent Open Source projects on Github. Now, onto some of the headline acts...
Yehuda Katz - Ruby on Rails and jQuery core team member delivers the keynote
Gregg Pollack - of Ruby5 podcast and Code School fame
Ryan Bigg - Author of 'Rail