As of now, Angular thinks abc@abc
is a valid email address. Technically it might be, but when it happens in real life, the chance of it being a typo is probably way larger than it being an actual email address. I want a dot to be part of that validation.
Author Archives: lucia
Git: “git push” Pushed to A Different Remote Branch Than The One It’s Tracking Remotely?
git branch -vv
shows that my local develop
branch is tracking the remote fix/some-bug
branch. However, a git push
command pushed my commits to the remote develop
branch.
WTF?
Angular Material: No Instance Found For Handle Left
This is the error. “No instance found for handle left”. I’ve been allowing it to run rampant there for a while now due to tight schedule. Now that there’s a bit of extra time.. Let’s murder it.
Angular Model: Url Http Auto Prefix
Make use of ngModel. The http or https version:
Prevent Gulp From Breaking And Crashing On Error
Gulp has been giving me a lot of trouble since the day we met. Basically because he breaks his watch whenever he smells a bit of error in JavaScript. This is a serious pain in the ass, since with the site I’m working on, I’ll have to restart the server in Terminal, re-login, and click to the page I was previously on. Three additional steps for a minor change. No fun.
This is how to tame him.
Leaving Curly Braces Out of JS If Statement
I spent so much time with Coffee that I constantly want to write this in Javascript:
return if x
Today I encountered with a new issue:
if (true) a = 1; if (false) a = 2; a = 3;
What should a’s value be?
Firefox Input Unable to Select
Double clicking the text inside input and it doesn’t appear selected. Cursor can’t even be placed at the start of the input. It’s because of this:
-moz-user-select: none;
Either don’t use this on everything(*), or do a counter one on all <input>.
The Best Way to Learn a New Language
First, if you already have another language under your belt, search “X Language for Y Language Developers”. If not, no worries, simply find out these things about the new language: