Skip to content

Instantly share code, notes, and snippets.

name:Mason
data:{"templateID":"01-mason","originalName":"Mason","backgroundColour":"fbfbfb","header":{"type":"header","displayType":"image","contents":null,"alt":null,"href":null,"originalWidth":0,"originalHeight":0,"width":0,"height":0,"fileName":null},"footer":{"type":"footer"},"social":{"tweet":{"on":true},"fblike":{"type":"Like this email","href":null,"on":true},"webversion":{"on":true},"forwardtoafriend":{"on":true},"preferences":{"on":true}},"sections":[{"id":"full-width","content":[{"content":[{"contents":"<h1>Start designing your email</h1><p>Add new pieces of content like text, images and buttons to your email by dragging the tiles on the left where you want them to go.</p><p>Add different layouts to your email by clicking on the green <strong>Add layout</strong> button below.</p>","type":"text","validation":null}]}],"readOnly":false},{"id":"3-col","content":[{"content":[{"type":"image","isFullWidth":true,"alt":"","fileName":"","halign":"center","href":"","originalWidth":0,"originalHeight":0,"validat
{
"templateID": "01-mason",
"originalName": "Mason",
"backgroundColour": "fbfbfb",
"header": {
"type": "header",
"displayType": "image",
"contents": null,
"alt": null,
"href": null,
data[EventSetting][autosave]:1
data[EventSetting][layout][group][0][group][0][group][0][bgimage]:/img/events//img/events/events/splash/DSC_5839.jpg
data[EventSetting][layout][group][0][group][0][group][0][eventImage]:true
data[EventSetting][layout][group][0][group][0][group][0][group][0][class]:stretchBox
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][0][element]:title
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][0][styles][padding-left]:0em
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][0][class]:
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][1][element]:subtitle
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][1][styles][padding-left]:0em
data[EventSetting][layout][group][0][group][0][group][0][group][0][group][1][styles][padding-top]:0em
@jdjkelly
jdjkelly / gist:0bddf2e834b6d6bc2174
Last active December 25, 2021 14:30
Making Accessible Ember Components

Making Accessible Ember Components

Making the web accessible is important. We have ethical and, in some cases, legal obligations to ensuring access to all of users.

Luckily for us, it's easy to make an accessible Ember Component.

What are components?

To understand the accessibility story around Ember Components, we have to start by talking about Web Components. Ember Components are designed to be interoperable with the final Web Components API.

class ObjectBuilder
def prototype(proto)
# Leave method implementations on the proto object
ivars = proto.instance_variables.reject{ |ivar_name|
proto.respond_to?(ivar_name.to_s[1..-1]) &&
proto.instance_variable_get(ivar_name).is_a?(Proc)
}
ivars.each do |ivar_name|
unless @object.instance_variable_defined?(ivar_name)
@object.instance_variable_set(
@jdjkelly
jdjkelly / gist:de3a3873175186c8e562
Last active August 29, 2015 14:06
How to track events emitted by Uniiverse.com's Direct Payments Platform
// Include, and initialize analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');

"Gamergate is a collective response to an epochal narrowing of human experience to the point where the only things we care to defend are consumer goods, distraction apparatuses whose reassuring simulations of progress and accomplishment must be sanctified because they can no longer imagine living without them."

Once, the Hassidic rabbi Zusya came to his followers with tears in his eyes. They asked him:

"Zusya, what's the matter?

And he told them about his vision; "I learned the question that the angels will one day ask me about my life."

The followers were puzzled. "Zusya, you are pious. You are scholarly and humble. You have helped so many of us. What question about your life could be so terrifying that you would be frightened to answer it?"

Zusya replied; "I have learned that the angels will not ask me, 'Why weren't you a Moses, leading your people out of slavery?' and that the angels will not ask me, 'Why weren't you a Joshua, leading your people into the promised land?"' Zusya sighed; "They will say to me, 'Zusya, why weren't you Zusya?'"

@jdjkelly
jdjkelly / generate-highlights.rb
Created September 8, 2015 01:56
Kindle Highlights -> Jekll Collection
require 'kindle_highlights'
require 'active_support/inflector'
kindle = KindleHighlights::Client.new(ARGV[0], ARGV[1])
books = kindle.books
bsins = books.keys.select { |key| books[key] =~ Regexp.new(ARGV[2], 'i') }
bsins.each {|bsin| puts "#{bsin} #{books[bsin]}\n" }
puts "\nChoose a BSIN:"
Running bash inside docker
`docker run -it <image> /bin/bash`