Skip to content

Instantly share code, notes, and snippets.

@kellysutton
kellysutton / blog-post
Last active August 29, 2015 14:15
Public Drafts in Jekyll
---
layout: post
title: "Public Drafts in Jekyll"
date: 2015-02-18 00:00:00
draft: true
---
One of the things I like to do with more…
@kellysutton
kellysutton / show-test-1.js
Last active August 29, 2015 14:15
Unit Testing Ember Data in Controllers
// Include everything from above
test('the "save" action calls #save', function () {
// The expect is crucial here, otherwise we can get
// false positives.
expect(1);
var model = null;
store.scheduleSave = function(context, resolver) {
ok(resolver.promise); // The actual assert
@kellysutton
kellysutton / gist:8119b227227571012c7b
Created January 22, 2015 19:10
Computed properties with promises
export default Ember.ObjectController.extend({
canVoteOnMotd: false,
_setCanVoteOnMotd: (function () {
var _self = this;
this.get('currentUser.motd_upvotes').then(function () {
if (/* some logic */) {
_self.set('canVoteonMotd', true);
}
})
@kellysutton
kellysutton / gist:c08398b77e1adadc2478
Created January 15, 2015 04:37
CSS Challenge Ideas

CSS Challenge Ideas

test('it created an Upvote with #createUpvote', function () {
expect(3);
var store = App.__container__.lookup('store:main');
store.scheduleSave = function(context, resolver) {
ok(1);
};
var user = null;
var story = null;
Ember.run(function () {
@kellysutton
kellysutton / LayerVault Support Engineer.md
Last active August 29, 2015 14:01
LayerVault Support Engineer

We're searching for a support engineer to help our customer support team grow.

You will be the engineering resource for the growing support team. You'll be learning the ropes of all LayerVault services to quickly diagnose and fix customer problems. But we're not just looking for short-term fixes to keep things running; you will also be in charge of crafting long-term solutions. If the support process can be improved, you will work with the support team to do so.

LayerVault is a remote company, with headquarters in New York, NY. This position can either be remote or in New York.

You

  • Have experience with Ruby and Ruby on Rails.
  • Have patience for dealing with both humans and computers. You know that humans can have their feelings hurt and that computers are cold, metal boxes put on this earth to torment your very existence.
@kellysutton
kellysutton / Gemfile
Last active December 16, 2020 13:13
Web Push Package in Rails.
# The rubygems.org grocer-pushpackager needs a bump. Ride that <del>dragon</del> master.
gem 'grocer-pushpackager', git: 'git@github.com:layervault/grocer-pushpackager.git'
# Houston will help us send the notifications themselves.
gem 'houston'
curl -v \
-o /dev/null \
"https://layervault-preview.imgix.net/remote_preview_data/436751/original/.1366399179.726358.preview_Front_Page.psd20130419-9702-55ihns.png?fit=max&w=620&dpr=2&s=f1a5c768644356087baf28d5cabf9c74"
---- 200: Request includes CORS headers ----
curl -i \
-H "If-Modified-Since:Fri, 19 Apr 2013 19:19:49 GMT" \
"https://layervault-preview.imgix.net/remote_preview_data/436751/original/.1366399179.726358.preview_Front_Page.psd20130419-9702-55ihns.png?fit=max&w=620&dpr=2&s=f1a5c768644356087baf28d5cabf9c74"
@kellysutton
kellysutton / gist:6335882
Created August 25, 2013 19:49
rap genius offer
I have an incredible team I’m sure you’ve heard of in New York and looking for another Ruby engineer to join the team. I'm working with the founder of RapGenius, Tom Lehman, on this opportunity and have multiple openings for mid level to sr/principal/lead developers. I helped these guys staff 2 Ruby on Rails engineers, both from well-known companies, let me know if you’d be interested in checking them out.
They pinned down $15M from Ben Horowitz and have been getting a ton of attention. I would be interested in hearing your thoughts.
www.rapgenius.com
http://rapgenius.com/Marc-andreessen-why-andreessen-horowitz-is-investing-in-rap-genius-lyrics (Definitely check this one out)
http://news.ycombinator.com/item?id=4698010 and http://rapgenius.com/posts/Rap-genius-is-hiring
We raised $15M from Andreessen Horowitz to build the Internet Talmud™ (read more here: http://goo.gl/LKNHO).
@kellysutton
kellysutton / my_serializer.rb
Last active December 20, 2015 02:39
ActiveModel::Serializer cache_digest-esque behavior
class PersonSerializer < ActiveModel::Serializer
def model_version
Digest::MD5.hexdigest(File.read(File.join(Rails.root, "app/serializers", "#{self.class.to_s.underscore}.rb")).gsub(/\s/,''))
end
end