Skip to content

Instantly share code, notes, and snippets.

> ng serve --host=0.0.0.0 --port=8100 --progress=false
[ng] Cannot read property 'host' of null
[ng] TypeError: Cannot read property 'host' of null
[ng] at Architect._loadJsonFile (/Users/mhartington/GitHub/StarTrack-ng/node_modules/@angular-devkit/architect/src/architect.js:200:32)
[ng] at Architect.loadArchitect (/Users/mhartington/GitHub/StarTrack-ng/node_modules/@angular-devkit/architect/src/architect.js:68:45)
[ng] at MergeMapSubscriber.workspaceLoader.loadWorkspace.pipe.operators_1.concatMap.workspace [as project] (/Users/mhartington/GitHub/StarTrack-ng/node_modules/@angular/cli/models/architect-command.js:150:184)
[ng] at MergeMapSubscriber._tryNext (/Users/mhartington/GitHub/StarTrack-ng/node_modules/@angular/cli/node_modules/rxjs/operators/mergeMap.js:122:27)
[ng] at MergeMapSubscriber._next (/Users/mhartington/GitHub/StarTrack-ng/node_modules/@angular/cli/node_modules/rxjs/operators/mergeMap.js:112:18)
[ng] at MergeMapSubscriber.Subscriber.next (/Users/mhartington/GitHub/Star

Mac's tend to have App Icons that are all over the place. Here's a quick little trick to modify them and make them consistent.

Disable SIP

First we need to disable SIP to change some system icons. This is pretty simple, but read about it here

With this done, we can now modify apps like Finder, Messages, Mail, or any Apple Apps.

Download LiteIcon

# reload config
alt - r : khd -e "reload"
# open terminal, blazingly fast compared to iTerm/Hyper
alt - f : open /Applications/Kitty.app
alt - s : open /Applications/Safari.app
alt - d : open /Applications/Slack.app
# focus window
# alt - h : chunkc tiling::window --focus west
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
sundayFirstCalendar = 'cal && date "+%-m %-d %y"'
mondayFirstCalendar = 'cal | awk \'{ print " "$0; getline; print "Mo Tu We Th Fr Sa Su"; \
getline; if (substr($0,1,2) == " 1") print " 1 "; \
do { prevline=$0; if (getline == 0) exit; print " " \
substr(prevline,4,17) " " substr($0,1,2) " "; } while (1) }\' && date "+%-m %-d %y"'
command: sundayFirstCalendar
#Set this to true to enable previous and next month dates, or false to disable

Let's face, it…No one likes a slow app. And with Progressive Web Apps, a great experience requires everything to be fast. This is not a vague statement either, research shows that about half of your users will leave your app if it does not load within 3 seconds over the network. Thankfully, there's APIs in place to help you achieve faster loading, with little effort. We'll look at rel=preload and how this little property, can speed up our loading performance.

What the preload?

rel=preload is a relatively new value you can use for the rel attribute of the link element. It is a special value that the browser can read, and know that the resource it's attached to is important. Once a browser sees a link element with preload, it will automatically start downloading the asset instantly.

But how is this different from the browsers normal flow? Well, when a browser request an html page, the parse will read the document, and pull

let g:gitgutter_sign_added = '⎸'
let g:gitgutter_sign_modified = '⎸'
let g:gitgutter_sign_removed = '⎸'
let g:gitgutter_sign_removed_first_line = '⎸'
let g:gitgutter_sign_modified_removed = '⎸'
augroup ConflictMarkerDetect
autocmd!
autocmd BufReadPost * call HighlightConflicts()
augroup END
function! HighlightConflicts() abort
syntax region conflictHead
\ containedin=ALL
\ start=/^<<<<<<< \@=/
\ end=/^=\@=/
syntax region conflictMerge
import { Directive, Input } from '@angular/core';
import { Keyboard } from '@ionic-native/keyboard';
import { Subscription } from 'rxjs/rx';
@Directive({
selector: '[hideOnKeyboard]'
})
export class HideOnKeyboardDirective {
@Input('hideOnKeyboard') hideKeyboard: HTMLElement;
private onShowSubscription: Subscription;
.controller('canvasCtrl', canvasCtrl);
console.clear();
function canvasCtrl(FBURL) {
// DRAWING CANVAS
var ref = FBURL.db;
var pixelDataRef = ref.child('canvas');
//Set up some globals