sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
Sequelize is a powerful library in Javascript that makes it easy to manage a SQL database. Sequelize can layer over different protocols, but here we'll use PostgreSQL. At its core, Sequelize is an Object-Relational Mapper – meaning that it maps an object syntax onto our database schemas. Sequelize uses Node.JS and Javascript's object syntax to accomplish its mapping.
Under the hood, Sequelize used with PostgreSQL is several layers removed from our actual database:
pg
(PostgreSQL).pg
connects to your PostgreSQL database and queries it or transforms its data.pg
passes the data back to Sequelize, which parses and returns that data as a Javascript object.Table of Contents
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
#Understanding closures, callbacks and promises
For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.
10 months into my full-time dev career, and I would struggle to explain these words to a peer.
So I decided it was time to face my fears, and try to get my head around each concept.
Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.
##Windows users:
cmder will be refered as console
##Mac Os, Ubuntu and windows users continue here:
homestead
utf8_general_cibrew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents
Replace /usr/local/etc/nginx/nginx.conf
with the nginx.conf
in this gist. I'm using port 5000 for my current project. Obviously, change server_name
as well, and probably the name of its access log.