Skip to content

Instantly share code, notes, and snippets.

Working on something exciting

Alexey Raspopov alexeyraspopov

Working on something exciting
View GitHub Profile
View build.mjs
// Create a directory called "pages" next to
// this file, put markdown files in there, and
// then run:
// ```
// $ node build.mjs
// ```
// Then deploy the "build" directory somewhere.
bvaughn /
Last active Dec 4, 2020
`useSubscription` and `useMutableSource` tearing and deopt behavior.

useSubscription and useMutableSource1 tearing and deopt behavior.

Mounting a new tree

The tree below represents a React application mounting. During mount, two components read from an external, mutable source. The first one (List) reads version 1 of that data and the second one (Item) reads version 2.


useSubscription (legacy mode)


View Infrastructure.js
let cache = new Map();
let pending = new Map();
function fetchTextSync(url) {
if (cache.has(url)) {
return cache.get(url);
if (pending.has(url)) {
throw pending.get(url);
malyw / index.js
Last active Jan 27, 2021
Capture DOM element screenshot using Chrome headless
View index.js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('', {waitUntil: 'networkidle'});
View system-sans-serif-fonts.css
body {
"Segoe UI",
"Noto Sans",
"Droid Sans",
A-gambit /
Last active Mar 24, 2020
Proposal for lightning talk at ReactiveConf 2017: How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

How do you make friends with React and FRP? 🤔 Start to develop your application using Focal.

This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf


Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal

View _FP reading

A series of reading lists mostly related to functional programming.

icebob / webpack.server.config.js
Last active Jun 29, 2018
NodeJS server/backend bundle with webpack
View webpack.server.config.js
var webpack = require('webpack');
var path = require('path');
var fs = require('fs');
var nodeModules = {};
.filter(function(x) {
return ['.bin'].indexOf(x) === -1;
.forEach(function(mod) {
Rich-Harris /
Last active Jan 27, 2021
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

rebcabin / kalmanSample.c
Last active Apr 22, 2020
Kalman filtering as a fold with CBLAS and LAPACK
View kalmanSample.c
Copyright 2016 Brian C. Beckman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software