Skip to content

Instantly share code, notes, and snippets.


Bruno Lemos brunolemos

Block or report user

Report or block brunolemos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View console-function-names.js
const bypass = [
// function names to avoid logging
const collapsed = [
// function names to groupCollapsed
module.exports = function(babel) {
const { types: t } = babel;
const wrapFunctionBody = babel.template(`{
View PostVirtualizedComments.tsx
import {
} from "react-native";
import {Font, Space} from "../atoms";
dominictarr /
Created Nov 26, 2018
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.


otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

# Darkify Slack on Mac OS or Linux.
# curl | sh
if [ "`uname -s`" = "Darwin" ]; then
clodal /
Last active Feb 5, 2020
Describes how to verify a Zeit Now domain with AWS SES for email sending

How to setup AWS SES with Zeit Now

  1. Domain Verification Record
now dns add <NAKED_DOMAIN> _amazonses TXT <VALUE>
  1. DKIM Record Set
now dns add <NAKED_DOMAIN> <KEY_1>._domainkey CNAME <VALUE_1>
bvaughn /
Last active Feb 12, 2020
How to use profiling in production mode for react-dom
bvaughn /
Last active Feb 24, 2020
Interaction tracing with React

Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

This Gist provides some high-level docum

wcandillon / wallet-animation.js
Created Sep 3, 2018
React Native Apple Wallet Animation
View wallet-animation.js
import React from "react";
import {
} from "react-native";
bvaughn /
Last active Nov 4, 2019
Notes about the in-development React <Profiler> component


React 16.4 will introduce a new Profiler component (initially exported as React.unstable_Profiler) for collecting render timing information in order to measure the "cost" of rendering for both sync and async modes.

Profiler timing metrics are significantly faster than those built around the User Timing API, and as such we plan to provide a production+profiling bundle in the future. (The initial release will only log timing information in DEV mode, although the component will still render its children- without timings- in production mode.)

How is it used?

Profiler can be declared anywhere within a React tree to measure the cost of rendering that portion of the tree. For example, a Navigation component and its descendants:

View curry-typescript.ts
type ThemeColor = string;
type Theme = { id: number, color: ThemeColor }
type State = { themes?: [Theme] }
interface CurriedFunction1<T1, R> {
(t1: T1): R;
interface CurriedFunction2<T1, T2, R> {
(t1: T1): CurriedFunction1<T2, R>;
You can’t perform that action at this time.