- Prototypal inheritance forces an unstated empty object onto your object with key
prototype
- functions can act as object constructors but with the same syntax
- empty array members break loops
Infinity
/-Infinity
+0
/-0
null
is an object- testing
NaN === NaN
is always false typeof
always returnsobject"
for all different reference types- the type of
NaN
(not a number) is literally"number"
but as a string void
looks like a Java class but its only job is to returnundefined
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
# First time | |
mkdir gh-pages | |
touch gh-pages/index.html | |
git add gh-pages | |
git commit -m "First commit of GitHub Pages branch" | |
git push origin master | |
# Subsequent times | |
# Edit, save, commit, push files inside gh-pages directory | |
git subtree push --prefix gh-pages origin gh-pages |
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
// One global variable for all your JavaScript | |
var MY_SITE = window.MY_SITE || {}; | |
// Requires jQuery | |
// Global jQuery object is aliased to avoid polluting global namespace with "$" | |
MY_SITE = (function ($) { | |
'use strict'; | |
var private_function; |
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
/* ------------------------------------------------------- | |
Old-school way to create child objects from parent objects | |
--------------------------------------------------------*/ | |
var Person = function (name, age, sex) { | |
this.name = name; | |
this.age = age; | |
this.sex = sex; | |
} | |
Person.prototype.sayGreeting = function () { |
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
# Create environment | |
mkvirtualenv -p python3 mydjangopackage | |
pip install django sphinx sphinx-autobuild sphinx-rtd-theme | |
# Create demo environment | |
mkvirtualenv -p python3 mydjangopackagedemo | |
pip install django gunicorn psycopg2 whitenoise dj-database-url | |
# Create docs | |
mkdir docs |
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
// H5BP Front-end Developer Interview Questions | |
// https://github.com/h5bp/Front-end-Developer-Interview-Questions#jscode | |
// Usage: | |
// 1 = add(1)(); | |
// 3 = add(1, 2)(); | |
// 6 = add(1, 2)(3); | |
// 10 = add(1, 2)(3, 4); | |
// 0 = add()(); | |
var add = function () { |
Divergence-convergence model by Béla H. Bánáthy
- Deduction
- Induction
- Deduction
- Induction
Double Diamond by British Design Council
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
<h1>Hello, world!</h1> | |
</body> |
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
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl |
OlderNewer