This file contains code snippets to be used while following the Angular 2 with Webpack Project Setup video tutorial.
You can find the full project in the angular2-course-webpack-starter repository.
<!DOCTYPE html>
(() => { | |
'use strict'; | |
/** | |
* get unique contacts | |
* @param {object} contacts | |
* @return {Array.<Array.<string>>} | |
*/ | |
const getUniqueContacts = (contacts) => { |
Process for setting up github pages with namecheap domain. | |
1. Go to namecheap.com, select and buy domain name. | |
2. Login to namecheap, go to username drop down and select dashboard. | |
3. Go to DomainList | |
4. Click manage button | |
5. Click Advanced DNS tab | |
6. Click add record and add three records: | |
Type: A Record | Host: @ | Value: 192.30.252.153 | TTL: Automatic |
// Trie.js - super simple JS implementation | |
// https://en.wikipedia.org/wiki/Trie | |
// ----------------------------------------- | |
// we start with the TrieNode | |
function TrieNode(key) { | |
// the "key" value will be the character in sequence | |
this.key = key; | |
This file contains code snippets to be used while following the Angular 2 with Webpack Project Setup video tutorial.
You can find the full project in the angular2-course-webpack-starter repository.
<!DOCTYPE html>
<script>console.log({{ product | json }});</script> |
var util = require('util'), | |
events = require('events'); | |
var colors = require('colors'); | |
var testsResults = { | |
passed:0, | |
failed:0 | |
} |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<!-- | |
All appSettings are made available to your Node.js app via environment variables | |
You can access them in your app through the process.env object. | |
process.env.<key> | |
--> |
func checkShouldDownloadFileAtLocation(urlString:String, completion:((shouldDownload:Bool) -> ())?) { | |
var request = NSMutableURLRequest(URL: NSURL(string: urlString)!) | |
request.HTTPMethod = "HEAD" | |
var session = NSURLSession.sharedSession() | |
var err: NSError? | |
var task = session.dataTaskWithRequest(request, completionHandler: { [weak self] data, response, error -> Void in | |
if let strongSelf = self { | |
var isModified = false |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\