Skip to content

Instantly share code, notes, and snippets.

View jschwarty's full-sized avatar

Justin Schwartzenberger jschwarty

View GitHub Profile
describe('doit', () => {
it('should build graph', () => {
const t = {
cart: ['saved'],
saved: ['items'],
items: []
};
const r = {
cart: 'cart',
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
class NgxLetContext {
ngxLet: any;
}
/*
* Example usage
* <ng-container *ngxLet="person$ | async as person">
* <h1>{{person.name}}</h1>
@jschwarty
jschwarty / git.zsh
Last active October 12, 2019 17:22
Custom functions for oh-my-zsh terminal to work with common git stuff
# Sync master with remote upstream (and re-checkout previous branch)
function gitsum {
currentBranch=$(git symbolic-ref -q --short HEAD)
git fetch upstream
git checkout master
git merge upstream/master
git push
git checkout $currentBranch
}
@jschwarty
jschwarty / .zshrc
Last active October 25, 2019 01:35
oh-my-zsh .zshrc customization
ZSH_THEME="agnoster"
plugins=(git nvm)
prompt_context() {}
prompt_dir() {
prompt_segment blue $CURRENT_FG '%1~'
}
@jschwarty
jschwarty / ng-let.directive.ts
Last active June 30, 2020 14:41
Angular ngLet directive
// From https://stackblitz.com/edit/directive-collection-with-examples?file=src%2Fapp%2Fng-let.directive.ts
import {
Directive,
Input,
TemplateRef,
ViewContainerRef,
EmbeddedViewRef
} from "@angular/core";
@Directive({
@jschwarty
jschwarty / settings.json
Last active June 7, 2024 20:20
VSCode setting to set ./node_modules/.bin into PATH on new terminal window open
"terminal.integrated.env.osx": {
"PATH": "./node_modules/.bin:${env:PATH}"
},
"terminal.integrated.profiles.osx": {
"zsh": {
"path": "zsh",
"args": ["-i"]
}
},