This file contains hidden or 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
'use strict'; | |
angular | |
.module('app', []) | |
.config([]) | |
.run(['$location', '$route'], function () { | |
const original = $location.path; | |
$location.path = function (path, reload) { | |
if (reload === false) { | |
const lastRoute = $route.current; |
This file contains hidden or 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
import apiProvider from './provider'; | |
export class ApiCore { | |
constructor(options) { | |
if (options.getAll) { | |
this.getAll = () => { | |
return apiProvider.getAll(options.url); | |
}; | |
} |
This file contains hidden or 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
<# | |
Note: Eliminate `-WhatIf` parameter to get action be actually done | |
Note: PS with version prior to 4.0 can't delete non-empty folders | |
#> | |
Get-ChildItem -Path "." -Include "node_modules" -Recurse -File:$false | Remove-Item -Recurse -Force -WhatIf |
This file contains hidden or 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
// |
This file contains hidden or 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
let obj1 = { firstName: 'John', lastName: 'Doe', email: '[email protected]' }; | |
let obj2 = { email: '[email protected]', phone: '012–345–6789' }; | |
let obj3 = { city: 'Salt Lake City', state: 'Utah' } | |
function merge(…arr) { | |
return arr.reduce((acc, cur) => { | |
// Can add custom logic for how keys or nested values should be handled. | |
for (let key in cur) { |
This file contains hidden or 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
let obj1 = { firstName: 'John', lastName: 'Doe', email: '[email protected]' }; | |
let obj2 = { email: '[email protected]', phone: '012–345–6789' }; | |
let obj3 = { city: 'Salt Lake City', state: 'Utah' } | |
let newObj = Object.assign({}, obj1, obj2, obj3); | |
// { | |
// firstName: 'John', |
This file contains hidden or 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
let obj1 = { firstName: 'John', lastName: 'Doe', email: '[email protected]' }; | |
let obj2 = { email: '[email protected]', phone: '012–345–6789' }; | |
let obj3 = { city: 'Salt Lake City', state: 'Utah' } | |
let newObj = {…obj1, …obj2, …obj3}; | |
// { | |
// firstName: 'John', |
This file contains hidden or 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
<fieldset> | |
<legend>Education</legend> | |
<select class="form-control dropdown" id="education" name="education"> | |
<option value="" selected="selected" disabled="disabled">-- select one --</option> | |
<option value="No formal education">No formal education</option> | |
<option value="Primary education">Primary education</option> | |
<option value="Secondary education">Secondary education or high school</option> | |
<option value="GED">GED</option> | |
<option value="Vocational qualification">Vocational qualification</option> | |
<option value="Bachelor's degree">Bachelor's degree</option> |
This file contains hidden or 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
[ | |
{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "Åland Islands", | |
"code": "AX" | |
}, | |
{ |
This file contains hidden or 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
[ | |
{ | |
"name": "Alabama", | |
"abbreviation": "AL" | |
}, | |
{ | |
"name": "Alaska", | |
"abbreviation": "AK" | |
}, | |
{ |
NewerOlder