(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
// Accepts a single paramater which is one or more emails separated | |
// by space,comma,semicolon,tab, or newline. | |
// Returns an array of tokens that should be emails | |
// Does not validate emails to see if they are well formed. | |
exports.parseEmails = function(emails) { | |
return emails.toLowerCase().split(/[\s,;\t\n]+/); | |
}; | |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be usedHi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
var getPosition = function (options) { | |
return new Promise(function (resolve, reject) { | |
navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
}); | |
} | |
getPosition() | |
.then((position) => { | |
console.log(position); | |
}) |
========================== | |
How Software Companies Die | |
========================== | |
- Orson Scott Card | |
The environment that nurtures creative programmers kills management and | |
marketing types - and vice versa. | |
Programming is the Great Game. It consumes you, body and soul. When | |
you're caught up in it, nothing else matters. When you emerge into |
Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.
TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.
Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.
Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!
import {createAction} from 'redux-actions' | |
import { | |
SOMETHING_STARTED, | |
SOMETHING_SUCCESS, | |
SOMETHING_ERROR | |
} from './constants'; | |
export const somethingStarted = createAction(SOMETHING_STARTED); | |
export const somethingSucceeded = createAction(SOMETHING_SUCCESS); | |
export const somethingFailed= createAction(SOMETHING_ERROR); |