Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Campbell paulca

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am paulca on github.
  • I am paulca (https://keybase.io/paulca) on keybase.
  • I have a public key ASD4lq2sJQ__hJk-Lf-pDqZ7I8B4dp6FAHw5fBA80kBORgo

To claim this, I am signing this object:

@paulca
paulca / donnybrook-hotel-observation.md
Last active Jan 23, 2018
Donnybrook Hotel Observation
View donnybrook-hotel-observation.md

To whom it may concern,

Myself and my wife, Ciara, would like to add our voices to those observing against the proposed development at 1–3 The Crescent in Donnybrook.

As residents in the area for the past 12 years, we have no objection in principle to the establishment of a new hotel. A case in point is the Hampton Hotel, which provides local amenity, is set back from the road and is delightfully in keeping with the rest of the village.

The proposed designs appear to have been put together without any consideration for the aesthetic, the history and the preservation of the spirit of Donnybrook Village.

It feels like the proposed development has been designed in a vacuum, and there is nothing in the plans to reflect how the architects sought to marry the legacy of the existing village with their vision for the future.

@paulca
paulca / script.md
Last active Aug 29, 2015
So Coded 2015 Script
View script.md

SO Coded 2015 - The MC Script

Thursday

Having given the last talk at So Coded 2013, I was delighted to be asked to come and MC the 2015 edition of the conference. The last time I MC'ed at an event, I found that briefly interviewing speakers before their slot led to a lot of randomness and, in one case, introducing the wrong speaker. So I decided to try and introduce a very loose narrative, based on a picaresque journey that represented the conference’s thematic arc, but with lots of my favourite pop culture references. Many thanks to Julia, Ole and Thorben for having me back.

I’ve added notes in italics just in case any of the (obvious, but obviously obvious to me) references aren’t clear. Much of the sense of these little bits are with apologies to Jennifer Brook and her time machine from Úll

View sampleterms
In order to register for this event, you must agree to the following:
1) You must agree to the [publicity release](http://link-to-publicity-release)
2) You must agree to the [waiver](http://link-to-waiver)
View gist:7e95c044b5263c1f3119
paulca:~ paulcampbell$ which whois
/usr/bin/whois
paulca:~ paulcampbell$ whois javascript.nyc
Domain Name: JAVASCRIPT.NYC
Domain ID: D112597-NYC
Sponsoring Registrar: GoDaddy.com, Inc.
Sponsoring Registrar IANA ID: 146
Registrar URL (registration services): whois.godaddy.com
Domain Status: ok
View backboneconf.js
$(function() {
// Request ticket release info from Tito API and template it into the page, if available.
var target = $("#barebones-registration"),
conferenceService = $.tito('bocoup/backboneconf'),
ticketTemplate = _.template($("#ticket-template").html());
conferenceService.releases().then(function(r) {
var ticketForm = $(ticketTemplate({
releases: r
View tito-source.html
<script type="javascript">
(function($){
var params, source;
params = function(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
source = params('source')
View active_record_extensions.rb
# class Event
# parse_dates :start_date, :end_date
# end
class ActiveRecord::Base
def self.parse_dates(*args)
args.flatten.each do |method_name|
class_eval do
define_method "#{method_name}=" do |date|
View original.rb
def display_date_or_range(event, sup = true, html = true, short = false)
return if event.start_date.blank? and event.end_date.blank?
if event.single_day?
if short
out = event.start_date.strftime("%b")
else
out = event.start_date.strftime("%B")
end
out << " "
View text
- [ ] one
- [ ] two
- [ ] three
You can’t perform that action at this time.