Skip to content

Instantly share code, notes, and snippets.


Brian Gonzalez briangonzalez

Block or report user

Report or block briangonzalez

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
briangonzalez / index.js
Last active Dec 14, 2017
Custom Casing ESlint Rules
View index.js
const checkAndReport (token, correct, context) {
if (token.toLowerCase().includes(correct.toLowerCase()) && !token.includes(correct))) {, `The standard variable casing is "${correct}", not ${}`);
module.exports.rules = {
"paypal-casing": context => ({
VariableDeclarator: (node) => {
checkAndReport(, 'Paypal', context)
View position-reminders.applescript
activate application "Reminders"
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
tell application "System Events"

Flow vs. Typescript


Built by Facebook

Stats for past month: 0 merged PRs, 30 Proposed PRs, 50 closed issues, 135 new issues, SO Questions ~0.9k

  • 👍 Built by Facebook, just like React – in practice, this doesn’t seem to provide a marked advantage for flow
briangonzalez / using-bluebird.js
Created Aug 4, 2017
Parellelizing multiple API requests.
View using-bluebird.js
const Promise = require('bluebird');
const getResponses = async (urls) => {
const requests = => fetch /* fetch is a newish builtin API */)
const responses = await Promise.all(requests)
return responses
const urls = [
briangonzalez /
Created Jun 25, 2017
Fixing conflicts caused by merging in master with eslint changes
git checkout master
git pull
git checkout my-branch
git rebase master
# Get conflicts, flip a table.
# (╯°□°)╯︵
git checkout . --theirs # we don't care about what's in master, we just want our files and we'll fix eslint errors ourselves
./node_modules/.bin/eslint . --fix
View sorting.js
// A user has purchased products from Dollar Shave Club,
// noted below in the `purchased` array. When these products
// came out of our database, they were unsorted.
// Write the method below, `sortProducts`, to obtain a sorted
// array of the items purchased.
const sortedReference = [
# This file is blank, but here in order to have more clear view of the gist from within github.

eggplanet is an LA-based development shop started by two of the early engineers of Dollar Shave Club. We have experience building and optimizing apps as well helping teams grow and become more efficient.

View components.blur-loaded-image.js
import Ember from 'ember';
export default Ember.Component.extend({
classNameBindings: [ 'loaded:no-blur:blur' ],
loaded: false,
src: Ember.computed(function () {
return `${this.get('rawSrc')}?w=10`;
View circle.yml
version: 5.11.1
- git fetch origin
- git branch --force lint-ci-release origin/release
You can’t perform that action at this time.