Skip to content

Instantly share code, notes, and snippets.

View danielcooper's full-sized avatar

Daniel Cooper danielcooper

View GitHub Profile
class RenderRSS < Liquid::Block
def initialize(tag_name, markup, tokens)
super
@markup = markup
@attributes = {}
markup.scan(Liquid::TagAttributes) do |key, value|
@attributes[key] = value
end

Keybase proof

I hereby claim:

  • I am danielcooper on github.
  • I am danielcooper (https://keybase.io/danielcooper) on keybase.
  • I have a public key whose fingerprint is 472D 87C9 AF0F 3A3B 80B2 8609 1062 D8EA D30F D001

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://webservice.reapit.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:GetGeneralPropertyResponse xmlns:ns1="http://webservice.reapit.com/">
<Property xsi:type="tns:GeneralProperty">
<ID xsi:type="xsd:string">brdrps-PLY120182</ID>
<SalePrice xsi:type="xsd:int">575000</SalePrice>
<SaleMaxPrice xsi:type="xsd:int">0</SaleMaxPrice>
<SalePriceString xsi:type="xsd:string">&amp;#163;575,000</SalePriceString>
<PriceQualifier xsi:type="xsd:string" />
class AnAPIClass
include HTTParty
include HTTParty::DryIce
base_uri 'example.com'
cache Rails.cache
end
{\"address\":{\"county\":\"Devon\",\"locality\":\"Landscove\",\"postcode\":\"TQ13 7NA\",\"custom_location\":\"Rural North Totnes\",\"street\":\"Landscove\",\"town\":\"Newton Abbot\",\"display\":\"Landscove, Newton Abbot, Devon, TQ13\",\"name\":\"Beara Land\"},\"status\":\"Sold\",\"custom_status\":null,\"commission\":null,\"latitude\":50.48228,\"let_bond\":0,\"instructed\":\"2012-08-21\",\"area\":{\"imperial\":{\"unit\":\"sqft\",\"min\":0,\"max\":0},\"metric\":{\"unit\":\"sqm\",\"min\":0,\"max\":0}},\"price\":49500,\"energy_reports\":[],\"comm_rent\":null,\"user_field_2\":5,\"uploaded_on\":\"2012/05/09\",\"rm_let_type_id\":0,\"disclaimers\":[{\"file\":null,\"value\":\"You may download, store and use the material for your own personal use and research. You may not republish, retransmit, redistribute or otherwise make the material available to any party or make the same available on any website, online service or bulletin board of your own or of any other party or make the same available in hard copy or in any o
@danielcooper
danielcooper / gist:4058973
Created November 12, 2012 11:58
Linked Lists
class LinkedListNode
attr_accessor :next, :value
def initialize(value)
@value = value
end
end
class Person
attr_accessor :name
def initialize(name)
@name = name
end
end
class Employee < Person
attr_accessor :salary
module BugMakingSupport
def make_bugs
"#{@person.name} does some typing"
end
end
class Developer < Employee
include BugMakingSupport
end
class Code
def initialize(person)
@person = person
end
def make_bugs
"#{@person.name} does some typing"
end
end
@danielcooper
danielcooper / gist:3430097
Created August 22, 2012 22:31
Bit of cache config
backend facebookforcats {
.host = "localhost";
.port = "3000";
}