Friday, April 22, 2016

Angular 2 Text Field Autocomplete



 Similar to Facebook mentions, adds auto-complete to text boxes and text fields:

Angular 2 Mentions on Github

Angular 2 Radio Buttons

Until they fix checkboxes to use ngModel binding (here), this works pretty well:

<input type="radio" [checked]="selectedType=='first'" value="first" (click)="selectedType='first'"> First
<input type="radio" [checked]="selectedType=='second'" value="second" (click)="selectedType='second'"> second
{{selectedType}}

Sunday, April 3, 2016

GitHub Primer

Clone a repo:
git clone https://github.com/username/repo.git

To see the status of files:
git status

To commit changes:
git commit

Config git for a push:
git config --global user.name "username"
git config --global user.email "username@users.noreply.github.com"

To see the config:
vi ~/.gitconfig

To undo a git push
(from http://stackoverflow.com/questions/1270514/undoing-a-git-push):
git push -f origin 67..dc:master