In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
Full blog post can be found here: http://pnommensen.com/2014/09/07/high-performance-ghost-configuration-with-nginx/
Ghost is an open source platform for blogging founded by John O'Nolan and Hannah Wolfe. It's a node.js application and therefore works great in conjunction with nginx. This guide will will help you create a high performance nginx virtual host configuration for Ghost.
"Don't use #nodejs for static content" - @trevnorris. If #nginx isn't sitting in front of your node server, you're probably doing it wrong.
— Bryan Hughes (@nebrius) August 30, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
The node.js application runs on a port on your server
These rules are adopted from the AngularJS commit conventions.
-- Extensible Records | |
-- given a record | |
x = { age = 42, name = "Boke" } | |
-- you can clone and remove a field in the process | |
{ x - age } -- { name = "Boke" } | |
-- you can also add a field | |
{ x | species = "Jade Dragon" } -- { age = 42, name = "Boke", species = "Jade Dragon" } |
This just got linked to by the Y combinator news account, without proper context, | |
so a brief introduction: A month ago (end of May / early June 2014) I had a | |
Twitter conversation with a bunch of acquaintances. One tweet in the middle | |
of that thread, with obligatory hyperbole, was me saying that I think VR is | |
bad news. | |
Well, that part of the thread (but not the rest that provides context) recently | |
got retweeted, and then someone asked me if I could explain what I mean by that, | |
and because Twitter is a great platform for delivering 140 character slogans and | |
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#C# Coding Standards
Embrace refactoring! Make code refactorable by adding tests using TDD. Really TDD exists to allow refactoring.
The term code smell comes from Martin Fowler's book Refactoring. If you haven't already, read this book. The examples are in Java but they easily translate to C#. Don't write new code that has smells by refactoring them out. Here is a list of the most egregious smells:
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
Right now, afterModel
and redirect
are almost aliases; specifically, the default implementation of Route#afterModel
calls redirect
. The only difference is that the return value of redirect()
is not used in any way, so you can't, say, return a promise from redirect
and expect the transition to pause, which you'd be able to do with afterModel
.
Scumbag machty tried to deprecate redirect
, was met with pushback, and removed the soft deprecation. Now he's wondering if they are semantically separate enough to keep both around.
afterModel
is the last of promise-aware route-entry-validation hooks, which is to say that beforeModel
, model
, and afterModel
allow you to return promises that pause the transition until they resolve, and if they reject (or transitionTo
elsewhere), the transition gets aborted. I call them route-entry-validation hooks because one of their main jobs is to validate that the route in question can actually be entered at this time. Part of this validation
license: apache-2.0 |