Skip to content

Instantly share code, notes, and snippets.

ofbeaton /
Last active Jun 1, 2019
Learning Javascript Stack by ofBeaton

Learning Javascript Stack, by ofBeaton

This guide documents my journey in 2019 to learn the modern JS stack, for the frontend and backend ecosystem. It is sequential and each section builds on the previous one.

This guide focuses on tutorials as experienced by beginners and not a resource from a veteran, who may have lost perspective on what beginners struggle with or need to learn.

This guide will naturally become out of date as new versions of the various tools become out of date, and new tools emerge to replace old ones. Deviate as you see fit.

For a guide that has more up to date resources, but is less focused, look up the latest Front End Handbook from Front End Masters. As of this writing they have 2016-2019 editions.


ofbeaton /
Last active Apr 14, 2019
Typescript Default value when null is returned from a function call

In the case of a function that returns a value or null, and for which you want an initial value, you'll need to use a combination of concepts to keep it to a one liner and keep typescript happy.

Most answers on stack say turn off strict nulls. No.

(var && func(var)) || default

ofbeaton / TwigSubscriber.php
Last active May 11, 2018
Symfony 2.6+ User Timezone
View TwigSubscriber.php
namespace AppBundle\EventListener;
use AppBundle\Entity\User;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
You can’t perform that action at this time.