Skip to content

Instantly share code, notes, and snippets.

View fabriciofmsilva's full-sized avatar

Fabrício Silva fabriciofmsilva

View GitHub Profile
@fabriciofmsilva
fabriciofmsilva / javascript.md
Last active August 28, 2019 14:32
Interview questions
const a = 1;
let b = 2;
var c = 3;

console.log(window.a, window.b, window.c);

A) 1, 2, 3 B) undefined, 2, 3

@fabriciofmsilva
fabriciofmsilva / angular-concepts.md
Last active September 14, 2019 14:24
Angular Concepts

Angular DI

Ivy renderer

NodeInjector

bloom filter

R3Injector

@fabriciofmsilva
fabriciofmsilva / writing.md
Created August 22, 2019 19:08
Technical writing

Advice for Technical Writing

Picking something to write about

Write the article you wish you found when you googled something.

Write at the moment of learning

Comparing technologies is an underused format

function trySubmit() {
// Section 1
let spinner = createSpinner();
formStatus.appendChild(spinner);
submitForm().then(() => {
// Section 2
formStatus.removeChild(spinner);
let successMessage = createSuccessMessage();
formStatus.appendChild(successMessage);
}).catch(error => {
@fabriciofmsilva
fabriciofmsilva / moment-mock.js
Last active August 15, 2019 21:51
Moment Mock
import { fn as momentProto } from 'moment';
const MOCK_TODAY = '2019-08-14';
const sandbox = sinon.sandbox.create();
before(() => {
sandbox.stub(momentProto, 'toISOString');
momentProto.toISOString.withArgs().returns(MOCK_TODAY);
});
@fabriciofmsilva
fabriciofmsilva / brag-document-template.md
Created August 12, 2019 20:08
Brag document template

Brag document template

Here’s a template for a brag document! Usually I make one brag document per year. (“Julia’s 2017 brag document”). I think it’s okay to make it quite long / comprehensive – 5-10 pages or more for a year of work doesn’t seem like too much to me, especially if you’re including some graphs/charts / screenshots to show the effects of what you did.

One thing I want to emphasize, for people who don’t like to brag, is – you don’t have to try to make your work sound better than it is. Just make it sound exactly as good as it is! For example “was the primary contributor to X new feature that’s now used by 60% of our customers and has gotten Y positive feedback”.

Goals for this year

  • List your major goals here! Sharing your goals with your manager & coworkers is really nice because it helps them see how they can support you in accomplishing those goals!
// The core app code
var myApp = (function () {
'use strict';
// Create a public methods object
var methods = {};
/**
* Extend the public methods object

How to Write Better Code in Angular

Caching/Memoization

Optimize template expressions

  • Binary expressions
  • Function calls
  • Method calls
  • Primary expressions