I hereby claim:
- I am tthew on github.
- I am tthew (https://keybase.io/tthew) on keybase.
- I have a public key ASDeXOF72RPI_ZMTk-KRr6HjDTwzIU4mvYRJb7ryHRT2fAo
To claim this, I am signing this object:
const useWindowResize = invokeImmediately => { | |
const [immediatelyInvoked, setImmediatelyInvoked] = useState(false); | |
const [rect, setRect] = useState({ | |
innerWidth: undefined, | |
innerHeight: undefined | |
}); | |
const set = useCallback(() => { | |
if (!window) return; | |
const { innerWidth, innerHeight } = window; |
<ApiProvider> // attach observables to context | |
<router> | |
<blah> | |
<blah> | |
{connectApi(<ApiConnectedComponet />) // take context observerables and pass as props to component | |
</blah> | |
</blah> | |
</router> | |
</ApiProvider> |
// ==UserScript== | |
// @name Freed | |
// @description Free yourself from the Facebook feed. | |
// @version 1 | |
// @include https://www.facebook.com/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle(` | |
div[role=feed] { |
I hereby claim:
To claim this, I am signing this object:
A very basic / high-level example of how to use locally scoped cssmodules in Angular, via Webpack using the css-loader
.
Read the cssmodules readme and the css-loader README for lots more high-level information. Also checkout the lower-level ICSS (interoperable css) spec/readme for the nitty gritty.
Tl;dr this approach solves many of the same problems BEM sets out to solve
This would require a refactor of existing codebases to use Webpack. But beyond that (which may or may not be trivial depending on many different factors) it appears to be a maintainable and scalable strategy.
Check out this gulp-webpack-angular-seed I put together some time ago as well as the this resume application and this mnutrition branch for examples o
Verifying that +_tthew is my blockchain ID. https://onename.com/_tthew |
var filesystem = require('fs'); | |
var _ = require('lodash'); | |
var models = {}; | |
var relationships = {}; | |
var orm = function orm() { | |
var Sequelize = require('sequelize'); | |
var sequelize = null; |
var assert = require('assert'); | |
var path = require('path'); | |
var protractor = require('protractor'); | |
var webdriver = require('selenium-webdriver'); | |
var browser = process.env.browser || 'chrome'; | |
var driver = new webdriver.Builder() | |
.usingServer('http://localhost:4444/wd/hub') | |
.withCapabilities(webdriver.Capabilities[browser]()) | |
.build(); |
var assert = require('assert'); | |
var path = require('path'); | |
var protractor = require('protractor'); | |
var webdriver = require('selenium-webdriver'); | |
var browser = process.env.browser || 'chrome'; | |
var driver = new webdriver.Builder() | |
.usingServer('http://localhost:4444/wd/hub') | |
.withCapabilities(webdriver.Capabilities[browser]()) | |
.build(); |
var Metalib = require('fluent-ffmpeg').Metadata; | |
var ffmpeg = require('fluent-ffmpeg'); | |
var q = require('q'); | |
var filename = process.argv[2] || null; | |
if (!filename) { | |
console.log('No source file provided'); | |
return; | |
} |