Skip to content

Instantly share code, notes, and snippets.

Bootstrap & SASS in Intuition

The goal of this document is to provide a high level overview of scss and bootstrap in relation to Intuition and provide you with resources to dig deeper.

SASS/SCSS

SCSS turns CSS into a full blown language and an overwhelming number of features. We will primarily benefit from:

  • Imports
  • Variables
  • Mixins
'use strict';
// Test flatten
assertArray(flatten([[1, 2, [3]], 4]), [1, 2, 3, 4]);
assertArray(flatten([0, [[[[1]]], [[2, [3]]], 4], [5, 6]]), [0, 1, 2, 3, 4, 5, 6]);
// Test throws type error with array values other than integer
assertError(flatten, TypeError, [0, ["string", [2]]]);
// Test throws type error for arr

Asymptotic Notation

This is a brief intro to computational complexity and asymptotic notation. It may not cover some items in depth enough, in which case please refer to the resource materials below.

Objectives

  • Understand what computational complexity is.
  • Understand why asymptotic notation is used to describe computational complexity.
  • Be able to find the Big O for a given algorithm.
# Intro to Node (again)
## Objectives
By the end of this article you will be able to:
- Understand what APIs Node comes with and how they differ from the ones a web browser offers.
- Be able to use the REPL
- Be able to explain the history of Node and why it is so useful.
@JordanMajd
JordanMajd / xhr-example.js
Created May 18, 2016 02:24
This is an example of how to make an HTTP request using vanilla JS.
'use strict';
// Step One:
//
// in order to make an HTTP request we need an XMLHTTPRequest (XHR) object.
// Action: use new XMLHttpRequest() to create an XMLHttpRequest object and assign it to a variable.
var req = new XMLHttpRequest();
// The variable now holds an XMLHttpRequest object, which looks something like this:
//
// req = {
@JordanMajd
JordanMajd / index.html
Last active May 11, 2016 18:42
Where Is Waldo?
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Where is Waldo?</title>
<style>
#wenda {
display: none;
}
</style>
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"noyield" : true, // true: functions dont need yield
"bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"doctype-first": true,
"tag-pair": true,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"attr-no-duplication": true,
'use strict';
// Queue constructor
// properties:
// values: some way of storing data.
const Queue = function(){
// create the values property and assign it the value of an array literal.
this.values = [];
};
// Stack constructor
// properties:
// values: some way of storing data.
const Stack = function(){
// create the values property and assign it the value of an array literal.
this.values = [];
};
// pop
// description: