- Need for persistence
- Persistence in the real world
- Persistence in computers
- In memory
- Text/JSON/binary files
- Databases
- Types of databases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |
- What is a preprocessor?
- SCSS features:
- variables
- nesting
- partials and import
- mixins
- extend
- Javascript
- var
- functions
- string concat
- ES5, transpiling, polyfilling
- Visualizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<section id="container"> | |
<button name="dog">Add Dog</button> |
- Objects: collection of key-value pairs, where keys are unique
- Functions: they're contracts, they take in inputs, they usually output some value
- Modules: collection of objects and functions that is "exported" and can be "imported"
- Packages: description of one or more modules that are available to a developer
- Modules are not special
module.exports
- Importing modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const knexConfig = require('./knexfile'); | |
const knex = require('knex')(knexConfig['development']); | |
const User = require('./user')(knex); | |
User.find(1).then(function (user) { | |
console.log(user); | |
}); |
NewerOlder