Skip to content

Instantly share code, notes, and snippets.

View vitalbone's full-sized avatar

Vito Belgiorno-Zegna vitalbone

View GitHub Profile
@vitalbone
vitalbone / example-react-native-fastfile
Created June 5, 2020 05:55
Example React Native Fastfile (match, build, App Center deploys, TestFlight distribution)
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
name: PR & Deploy [UAT]
on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- uat
env:
APP_ENV: "staging"
@vitalbone
vitalbone / restore_heroku_db.md
Last active August 17, 2022 15:54
Restore a Heroku DB from an external DB source

Restore Heroku DB from an external DB source

1. Create an instance of a Heroku DB

$ heroku addons:create heroku-postgresql:plan -a app-name
# heroku addons:create heroku-postgresql:standard-0 -a cool-app-prod

2. Export external DB locally

@vitalbone
vitalbone / config.yml
Last active October 14, 2019 23:08
Node + Postgres = CircleCI config
version: 2
jobs:
build:
docker:
- image: circleci/node:latest
environment:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/db_name
POSTGRES_USER: postgres
POSTGRES_DB: db_name
@vitalbone
vitalbone / videos.ejs
Created September 16, 2019 11:09
Auto play video
<% include partials/header%>
<div class="container-fluid">
<div class="row">
<%videos.forEach((video) => {%>
<div class="col-lg-4">
<div class="card m-1">
<div class="card-body">
<p>
<h5><%=video.title%></h5>
@vitalbone
vitalbone / learning-react.md
Last active June 19, 2019 23:17
Learning React
@vitalbone
vitalbone / button-benchmarks.md
Last active June 19, 2019 23:19
Button Comparison Benchmarks

Button Comparison Benchmark

Benchmarks for Atlaskit button after we bumped the major version due to a massive rewrite using emotion. Google Lighthouse performance audit with 999 components rendered.

Component First Contentful Paint Speed Index Time to Interactive First Meaningful Paint First CPU Idle Estimated Input Latency
Current 2.0s 3.3s 4.3s 2.3s 4.3s 840ms
Current (with analytics) 2.0s 3.8s 4.3s 3.8s 4.3s 925ms
v11 2.0s 3.3s 3.8s 2.4s 3.8s 287.5ms
@vitalbone
vitalbone / npm-script-args.md
Created December 5, 2018 03:08
Pass args into an NPM script

Passing args into an NPM script

(According to the gospel of Tim Leslie)

Example

$ "start": "/bin/sh -c 'cd projects/${1:-$0} && yarn start' basic"

Usage

@vitalbone
vitalbone / knowledge.md
Created October 2, 2017 01:08
Knowledge