-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
| body { | |
| border: none !important; | |
| } | |
| .kineticjs-content { | |
| background-color: #282c34; | |
| } | |
| td { | |
| background-color: #282c34; |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
Here are seven JavaScript concepts you must understand before you go into your next JavaScript job interview:
-
Prototypes - JavaScript is a prototype-based language. Even more, it's a delegation-based system, which means that each object has a prototype chain. When you try to access a property on an object, and that property is not found, JavaScript looks at the object's prototype. The prototype is a delegate object, which means that the property lookup is delegated to the prototype object. That object, in turn, may have its own prototype. The search continues up the prototype chain until it reaches the root prototype, which is usually Object.prototype. The best feature of this system is that many object instances can share the same methods on a prototype object, which conserves memory and enables easy code reuse. To assign a prototype to a new object, you can use
Object.create(prototypeObject). Prototypal OO is the first course being offered in the "Learn JavaScript" series. -
Functional Programming
A curated list by Eric Elliott and friends. Suggest links at the original in the comments section or in the website incarnation.
This fork includes screen-captures of the websites, self-descriptions (which appear within quotation marks) from those sites and some metadata like publication date and GitHub stars and forks. It also may lag behind the original as new links are added there. Commentary is almost entirely from Eric Elliott’s original gist: a few summary descriptions were added for sites that omit capsule descriptions.
Help us turn this into a proper website!
This is a very exclusive collection of only must-have JavaScript links. I'm only listing my favorite links. Nothing else makes the cut. Feel free to suggest links if you think they're good
Functional programming gets a bad wrap about being too hard for mere mortals to comprehend. This is nonsense. The concepts are actually quite simple to grasp.
The jargon is the hardest part. A lot of that vocabulary comes from a specialized field of mathematical study called category theory (with a liberal sprinkling of type theory and abstract algebra). This sounds a lot scarier than it is. You can do this!
All examples using ES6 syntax. wrap (foo) => bar means:
function wrap (foo) {
Anonymous function means "function without a name".
This is one of the relatively few cases where the Wikipedia definition of a word, while not entirely wrong, is misleading. Lambdas and anonymous functions are distinct ideas.
These ideas are commonly confused because in many programming languages (and lambda calculus) all lambdas are anonymous or vise verse.
In JavaScript, not all lambdas are anonymous, and not all anonymous functions are lambdas, so the distinction has some practical meaning.
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| license: apache-2.0 |