This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PayrollRunner | |
def run! | |
TaxEngineWrapper.new(tax_engine).apply(commands) | |
computed_taxes = tax_engine.calculate_taxes | |
payroll.assign_taxes(computed_taxes) | |
end | |
# This is now a pure function from the view of its callers. | |
# Sweet! | |
def commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TaxCalculationSaver | |
def self.save_taxes!(payroll) | |
total_tax_amount = payroll.employees.map do |employee| | |
TaxCalculator.calculate(payroll, employee) | |
end.sum | |
PayrollSaver.save!(payroll, total_tax_amount: total_tax_amount) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /graphql | |
Content-Type: application/graphql | |
{ | |
post(id: 1) { | |
id | |
title | |
comments { | |
id | |
body | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'strict_templates' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/routes/application.js | |
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
currentUser: Ember.inject.service(), | |
pusher: Ember.inject.service(), | |
activate() { | |
this._listenToPusherEvents(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$color-list { | |
red #f00, | |
green #0f0, | |
blue #00f | |
} | |
@each $value in $color-list { | |
.#{nth($value, 1)} { | |
color: nth($value, 2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img srcset="https://assets.imgix.net/flower.jpg?w=50 50w, | |
https://assets.imgix.net/flower.jpg?w=100 100w, | |
https://assets.imgix.net/flower.jpg?w=150 150w, | |
... | |
https://assets.imgix.net/flower.jpg?w=5200 5200w, | |
https://assets.imgix.net/flower.jpg?w=5260 5260w" | |
src="https://assets.imgix.net/flower.jpg?w=540" | |
alt="A white flower" | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img srcset="https://assets.imgix.net/flower.jpg?w=50 50w, | |
https://assets.imgix.net/flower.jpg?w=100 100w, | |
https://assets.imgix.net/flower.jpg?w=150 150w, | |
https://assets.imgix.net/flower.jpg?w=200 200w, | |
https://assets.imgix.net/flower.jpg?w=250 250w, | |
https://assets.imgix.net/flower.jpg?w=300 300w, | |
https://assets.imgix.net/flower.jpg?w=350 350w, | |
https://assets.imgix.net/flower.jpg?w=400 400w, | |
https://assets.imgix.net/flower.jpg?w=450 450w, | |
https://assets.imgix.net/flower.jpg?w=500 500w, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |