Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🌩 ☁️ 🌧 ☁️ 🌧 🌩 ☁️

Rhy Moore morewry

💭
🌩 ☁️ 🌧 ☁️ 🌧 🌩 ☁️
View GitHub Profile
@morewry
morewry / _skatejs-rollup-bundle-size-stats.md
Last active Apr 7, 2021
Rollup Bundle Stats of "Hello, World" Web Components with SkateJS renderer options. Your approximate bundle size starting point before adding your own code.
View _skatejs-rollup-bundle-size-stats.md

Bundle Sizes

Your mileage will vary.

React

┌────────────────────────────────────┐
│                                    │
│   Destination: dist/index.umd.js   │
@morewry
morewry / find-xargs-mozjpegtran.sh
Created Nov 22, 2017
run mozjpegtran on all jpgs in current directory
View find-xargs-mozjpegtran.sh
find -L $PWD -type f -name "*.jpg" -print0 | xargs -0 -I'{}' mozjpegtran -outfile '{}'.out.jpg -optimise -copy none '{}'
@morewry
morewry / hyper-vs-lit-html.md
Created Sep 12, 2017
A brief features comparison between hyperHTML and lit-html
View hyper-vs-lit-html.md
hyperHTML lit-html
version 1.6.1 0.5.0
license ISC BSD + Patents
compatibility template literals Edge 13+, FF 34+, CH 41+, SF 9.1+, iOS 9.2+ No IE/Edge, FF 55+, CH 41+, SF 9.1+, iOS 9.2+
compatibility transpiled IE9+ FF 34+, WK (Android 4+), CH, SF, iOS 8+ template literals only</su
View keybase.md

Keybase proof

I hereby claim:

  • I am morewry on github.
  • I am morewry (https://keybase.io/morewry) on keybase.
  • I have a public key ASAAcv0HO34Ai0ekGGMmvqzMfiUZ_cRwVFOuAsoO97LU1Qo

To claim this, I am signing this object:

@morewry
morewry / monorepo-tool-comparison.md
Last active Aug 2, 2021
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)
View monorepo-tool-comparison.md

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

@morewry
morewry / check.sh
Created Feb 14, 2017 — forked from jusopi/check.sh
Set node version per project using .nvmrc file
View check.sh
#!/bin/sh
enter_directory(){
if [ "$PWD" != "$PREV_PWD" ]; then
PREV_PWD="$PWD";
if [ -e ".nvmrc" ]; then
nvm use;
fi
fi
}
@morewry
morewry / css_regression_testing.md
Created Jan 26, 2017 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools
View css_regression_testing.md

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@morewry
morewry / what-forces-layout.md
Created Aug 18, 2016 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
View angularjs_directive_attribute_explanation.md

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@morewry
morewry / dispatch-touch-event.coffee
Created Feb 28, 2015
Programmatically trigger touch event
View dispatch-touch-event.coffee
# http://codepen.io/morewry/pen/pvLxPV
# manually create touch event
touchStartOn = (el, x = 0, y = 0) ->
try
e = document.createEvent('TouchEvent')
e.initTouchEvent("touchstart", true, true)
catch err
try
e = document.createEvent('UIEvent')