git checkout --orphan future-master
git add -A # Add all files and commit them
git commit
git branch -D master # Deletes the master branch
git branch -m master # Rename the current branch to master
git push -f origin master # Force push master branch to github
git gc --aggressive --prune=all # remove the old files
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
| ## Installs for a new Mac | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew cask install google-chrome appcleaner hyper docker visual-studio-code keka google-backup-and-sync dropbox adware-removal-tool | |
| brew cask install skype | |
| brew install fish node python | |
| ## setup fish as default | |
| sudo cat /usr/local/bin/fish >> /etc/shell |
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
| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
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 { Directive, Input, HostBinding } from '@angular/core'; | |
| @Directive({ | |
| selector: 'img[appImageFallback]' | |
| }) | |
| export class ImageFallbackDirective { | |
| fallback = 'path/to/default/image.png'; | |
| @Input() src: string; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| /* Latitude/longitude spherical geodesy tools (c) Chris Veness 2002-2019 */ | |
| /* MIT Licence */ | |
| /* www.movable-type.co.uk/scripts/latlong.html */ | |
| /* www.movable-type.co.uk/scripts/geodesy-library.html#latlon-spherical */ | |
| /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| import Dms from './dms.js'; | |
| const π = Math.PI; |
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
| const node = val => { | |
| return { | |
| data: val, | |
| left: null, | |
| right: null | |
| }; | |
| } | |
| const buildTree = () => { | |
| const root = node(10); |
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
| const insert = (tree, value) => { | |
| const plug = []; | |
| plug.push(tree); | |
| while(plug.length){ | |
| const elem = plug.shift(); | |
| if(!elem.left) { | |
| elem.left = node(value); | |
| break; |
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
| const rightMost = tree => { | |
| if(!tree.right){ | |
| return tree; | |
| } | |
| return rightMost(tree.right); | |
| } | |
| const deleteRmt = tree => { | |
| if(!tree){ | |
| return; |
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
| // Iterative | |
| const size = (tree) => { | |
| const axe = [tree]; | |
| let total = 0; | |
| if(!tree){ | |
| return n; | |
| } | |
| while(axe.length) { |