Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /** | |
| * ValidateSpanishID. Returns the type of document and checks its validity. | |
| * | |
| * Usage: | |
| * ValidateSpanishID( str ); | |
| * | |
| * > ValidateSpanishID( '12345678Z' ); | |
| * // { type: 'dni', valid: true } | |
| * | |
| * > ValidateSpanishID( 'B83375575' ); |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000npm install -g npm to update npm to the latest versionNow you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.
| import {Directive, ElementRef, Input} from '@angular/core'; | |
| @Directive({ | |
| selector: '[background-image]' | |
| }) | |
| export class BackgroundImage { | |
| private el: HTMLElement; | |
| constructor(el: ElementRef) { | |
| this.el = el.nativeElement; |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
export type DeepPartial<T> = T extends Function ? T : (T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T);type DeepPartial = {git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
| import React from 'react'; | |
| import { renderHook } from '@testing-library/react-hooks'; | |
| import stateFactory from 'jest/stateFactory'; | |
| import configureMockStore from 'redux-mock-store'; | |
| import { Provider } from 'react-redux'; | |
| import { Store, AnyAction } from 'redux'; | |
| import { initialState as initialPaginationState } from '../../store/pagination/reducer'; | |
| import { useMyAwesomeHook } from '../useMyAwesomeHook'; |