bonus tip: for more darkness > https://darkreader.org/
- Connect to your EC2 instance
- Install zsh :
sudo apt-get update && sudo apt-get install zsh
- Edit your passwd configuration file to tell which shell to use for user
ubuntu
:sudo vim /etc/passwd
- Look for
ubuntu
user, and replacebin/bash
bybin/zsh
- Install OhMyZsh :
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
- Disconnect from your instance and reconnect it.
DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.
(tl;dr DOM builders like [domo][domo] trump HTML templates on the client.)
Like all web developers, I've used a lot of template engines. Like most, I've also written a few of them, some of which even [fit in a tweet][140].
The first open-source code I ever wrote was also one of the the first template engines for node.js, [a port][node-tmpl] of the mother of all JavaScript template engines, [John Resig][jresig]'s [micro-templates][tmpl]. Of course, these days you can't swing a dead cat without hitting a template engine; one in eight packages on npm ([2,220][npm templates] of 16,226 as of 10/19) involve templates.
John's implementation has since evolved and [lives on in Underscore.js][underscore], which means it's the default choice for templating in Backbone.js. And for a while, it's all I would ever use when building a client-side app.
But I can't really see the value in client-side HTML templates anymore.
{ scopeName = 'source.js'; | |
comment = 'JavaScript Syntax: version 2.0'; | |
fileTypes = ( 'js', 'htc', 'jsx' ); | |
foldingStartMarker = '^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$'; | |
foldingStopMarker = '^\s*\}'; | |
patterns = ( | |
{ name = 'meta.class.js'; | |
comment = 'match stuff like: Sound.prototype = { … } when extending an object'; | |
match = '([a-zA-Z_?.$][\w?.$]*)\.(prototype)\s*(=)\s*'; | |
captures = { |