Skip to content

Instantly share code, notes, and snippets.

View DylanFM's full-sized avatar

Dylan Fogarty-MacDonald DylanFM

View GitHub Profile
@DylanFM
DylanFM / sydney.json
Created December 11, 2012 04:29
Swellcast Sydney API response
{ "id" : 6,
"latitude" : "-33.8683",
"longitude" : "151.2086",
"name" : "Sydney",
"slug" : "sydney-surf-report",
"three_hourly_forecasts" : [ { "local_day" : "Tuesday",
"local_hour" : " 3am",
"swell_direction_compass_point" : "SSE",
"swell_direction_degrees" : "143",
"swell_height_metres" : "1.9",
@DylanFM
DylanFM / quote.markdown
Created October 10, 2011 18:11
A quote from The Elements of Typographic Style by Robert Bringhurst

Use spaced en dashes – rather than em dashes or hyphens – to set off phrases.

Standard computer keyboards and typewriters include only one dash, but a normal font of roman or italic type includes as least three. These are the hyphen and two sizes of long dash: the en dash – which is one en (half an em, M/2) in width – and the em dash—which is one em (two ens) wide.

In typescript, a double hyphen (- -) is often used for a long dash. Double hyphens in a typeset document are a sure sign that the type was set by a typist, not a typographer. A typographer will use an em dash, three-quarter em, or en dash, depending on the contest or personal style. The em dash in the nineteenth-century standard, still prescribed in many editorial style books, but the em dash is too long for use with the best text faces. Like the oversized space between sentences, it belongs to the padded and corseted aesthetic of Victorian typography.

Used as a phrase marker – thus – the en dash is set with a normal word space either si

Keybase proof

I hereby claim:

  • I am dylanfm on github.
  • I am dylanfm (https://keybase.io/dylanfm) on keybase.
  • I have a public key ASDiiOQyftNA33lli6nvQHdzP2UzgzybdzyUNwaDQUZfqAo

To claim this, I am signing this object:

@DylanFM
DylanFM / el quoté.md
Created December 11, 2013 23:02
A quote regarding peace of mind and working with machines, from page 165 of (this edition of) Zen and the Art of Motorcycle Maintenance by Robert M. Pirsig.

"Peace of mind isn't at all superficial, really," I expound. "It's the whole thing. That which produces it is good maintenance; that which disturbs it is poor maintenance. What we call workability of the machine is just an objectification of this peace of mind. The ultimate test's always your own serenity. If you don't have this when you start and maintain it while youre working you're likely to build you personal problems right into the machine itself."

jQuery.valitito = {}
jQuery.fn.valid = ->
delete jQuery(@).data()['valid']
jQuery(@).trigger('validate')
if jQuery(@).find('input').length
for input in jQuery(jQuery(@).find('input'))
if !$(input).valid()
jQuery(@).data('valid', false)
break
@DylanFM
DylanFM / gist:5522845
Created May 6, 2013 01:21
buoys scheduler error
May 06 11:10:08 buoys heroku/api: Starting process with command `coffee worker.coffee` by scheduler@addons.heroku.com
May 06 11:10:10 buoys heroku/scheduler.9077: Starting process with command `coffee worker.coffee`
May 06 11:10:11 buoys heroku/scheduler.9077: State changed from starting to up
May 06 11:10:11 buoys app/scheduler.9077: Byron Bay - fetching graph from http://mhl.nsw.gov.au/data/byron.gif
May 06 11:10:11 buoys app/scheduler.9077: Coffs Harbour - fetching graph from http://mhl.nsw.gov.au/data/coffs.gif
May 06 11:10:11 buoys app/scheduler.9077: Crowdy Head - fetching graph from http://mhl.nsw.gov.au/data/crowdy.gif
May 06 11:10:11 buoys app/scheduler.9077: Sydney - fetching graph from http://mhl.nsw.gov.au/data/syddir.gif
May 06 11:10:11 buoys app/scheduler.9077: Port Kembla - fetching graph from http://mhl.nsw.gov.au/data/portko.gif
May 06 11:10:11 buoys app/scheduler.9077: Batemans Bay - fetching graph from http://mhl.nsw.gov.au/data/batman.gif
May 06 11:10:11 buoys app/schedul
@DylanFM
DylanFM / Chips off the Old Benchley
Created February 5, 2013 23:35
Chips off the Old Benchley I find myself trying to find this every now and then.
How to Get Things Done
Robert Benchley
Chips off the Old Benchley
(c) 1949
A great many people have come up to me and asked me how I manage to get so
much work done and still keep looking so dissipated. Hundreds of thousands
of people throughout the country are wondering how I have time to do all my
painting, engineering, writing and philanthropic work when, according to the
html body * span.clear,html body * div.clear,html body * li.clear,html body * dd.clear{background:none;border:0;clear:both;display:block;float:none;font-size:0;list-style:none;margin:0;padding:0;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}.clearfix{display:inline-block}* html .clearfix{height:1%}.clearfix{display:block}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-col
@DylanFM
DylanFM / bagman.diff
Created July 27, 2011 17:14
Serialized values for indexed columns and drying up the serializing part a little too
diff --git a/lib/bagman/bag.rb b/lib/bagman/bag.rb
index df32a92..cb6ee30 100644
--- a/lib/bagman/bag.rb
+++ b/lib/bagman/bag.rb
@@ -51,17 +51,13 @@ module Bagman
end
target_class.send :define_method, "#{name}=" do |value|
+ serialised_value = self.class.serialise_value(value, options)
+