Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
Hey there!

RJ Zaworski rjz

👋
Hey there!
View GitHub Profile
@rjz
rjz / strict_null_checks.sh
Created Feb 26, 2021
Find TypeScript files that fail with --strictNullChecks enabled
View strict_null_checks.sh
#!/bin/bash
# Brute force search for TypeScript files in the current directory that fail
# the `--strictNullChecks` flag. YMMV.
# edit this function to exclude files that _shouldn't_ be checked.
filter_defs() {
grep -v node_modules \
| grep -v '.d.ts$' \
| sort \
@rjz
rjz / import_route53_zone_to_terraform.sh
Created May 30, 2020
Translates an existing AWS Route53 zone into Terraform `aws_route53_record` resources.
View import_route53_zone_to_terraform.sh
#! /bin/bash
#
# Translates an existing AWS Route53 zone into Terraform `aws_route53_record` resources.
#
# Released under the MIT license; YMMV. Tested on Linux with:
#
# - jq-1.6
# - terraform v0.12.26
# - aws-cli/1.17.14
#
@rjz
rjz / tsc_strict_null_checks_ok.ts
Created Feb 12, 2020
List of strict null-checked files inside a TypeScript project
View tsc_strict_null_checks_ok.ts
#!/bin/bash
# Returns a list of strict null-checked files inside the current directory.
# Useful for gradually introducing the `--strictNullCheck` flag to a
# TypeScript project.
#
# See: https://code.visualstudio.com/blogs/2019/05/23/strict-null
TS_FLAGS='--strictNullChecks --outDir=/dev/null'
@rjz
rjz / pdf_to_booklet.sh
Created Jan 5, 2020
Convert PDF pages into a printable booklet on Linux using psutils
View pdf_to_booklet.sh
#! /bin/bash
#
# Use `psutils` to convert a PDF into a printable booklet.
#
# Usage:
#
# $ ./pdf_to_booklet.sh my_file.pdf
#
# Distributed under terms of the MIT license.
@rjz
rjz / NOTES.md
Created Oct 15, 2019
New Relic FutureTalks 2019-10-14
View NOTES.md

Performance Antipatterns - Ben Evans ([@kittylyst][kittylyst]), New Relic

First, what's a pattern?

a model or design used as a guide in needlework and other crafts

-- OED

A model or design: patterns are more abstract than the substrate you're applying them to. Software's pretty abstract already, but design patterns are

@rjz
rjz / pdx-reactjs-lightning-talks.md
Last active Feb 13, 2019
Lightning talks from the @pdxreactjs meetup on 2019-02-12.
View pdx-reactjs-lightning-talks.md

PDXReactJS Lightning Talks

Lightning talks from the @pdxreactjs meetup on 2019-02-12.


A Better Approach to React Testing

Daniel Lemay - @dslemay

View whats-so-great-about-reason.md

What's so great about Reason?

PDXReactJS meetup / 13. Nov 2018 @benjamminj

Maintainability?

We want to make complex problems simple, and solve them in ways we can extend on.

JavaScript v. ReasonML:

View react-context-api.md

React Context API

George Song (Twitter: @zukefresh, Github: @gsong)

  • Need React >= v16.3.0
  • State: Component → Context → Unstated → Redux/MobX/(etc)
  • Two parts: <Provider /> and <Consumer />

How it works

View puppeteer.md