PDXReactJS meetup / 13. Nov 2018 @benjamminj
We want to make complex problems simple, and solve them in ways we can extend on.
JavaScript v. ReasonML:
PDXReactJS meetup / 13. Nov 2018 @benjamminj
We want to make complex problems simple, and solve them in ways we can extend on.
JavaScript v. ReasonML:
#!/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 \ |
#! /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 | |
# |
# A class-based template for jQuery plugins in Coffeescript | |
# | |
# $('.target').myPlugin({ paramA: 'not-foo' }); | |
# $('.target').myPlugin('myMethod', 'Hello, world'); | |
# | |
# Check out Alan Hogan's original jQuery plugin template: | |
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
# | |
(($, window) -> |
#!/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' |
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
// Redux actions using TypeScript discriminated unions | |
// | |
// Source: https://github.com/rjz/typescript-react-redux/ | |
// Actions | |
export type Action = | |
{ type: 'INCREMENT_COUNTER', delta: number } | |
| { type: 'RESET_COUNTER' } | |
Lightning talks from the @pdxreactjs meetup on 2019-02-12.
Daniel Lemay - @dslemay
# Nothin' special here: just Resig's pretty date function ported to Ruby | |
# http://ejohn.org/blog/javascript-pretty-date/ | |
def pretty_date(stamp) | |
now = Time.new | |
diff = now - stamp | |
day_diff = ((now - stamp) / 86400).floor | |
day_diff == 0 && ( | |
diff < 60 && "just now" || |