Skip to content

Instantly share code, notes, and snippets.

🍁
:octocat:

Dmitry Yv. dy

🍁
:octocat:
Block or report user

Report or block dy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dy
dy / react-vs-spect.md
Last active Aug 13, 2019
React vs spect
View react-vs-spect.md

Same amount of code, same time:

  • no html side-effect restriction allows easily implement portals and get rid of useContext hooks
  • batched state allows simpler effect code
  • aspects integrate better with DOM, can be applied to any elements
  • aspects can be loaded gradually, not as single framework bundle, allowing progressive enhancement
  • aspects cross-cut concerns and can be developed independently
  • references enable transparency for components - allows cross-subscribing
@dy
dy / jquery.js
Last active Aug 1, 2019
Spect style
View jquery.js
import $ from 'spect'
import { route } from 'wouter'
import { t } from 'ttag'
// main aspect
$('#app').aspect($app => {
let [ , { id } ] = route('user/:id')
$app.fx(() => $app
.attr({ loading: true })
@dy
dy / settings.json
Created Jul 17, 2019
Vscode settings
View settings.json
{
"workbench.colorTheme": "Eiffel",
"workbench.activityBar.visible": false,
"files.autoSave": "onFocusChange",
"files.trimTrailingWhitespace": true,
"window.menuBarVisibility": "default",
"workbench.statusBar.visible": false,
"editor.wordWrap": "on",
"files.insertFinalNewline": true,
"editor.tabSize": 2,
@dy
dy / context-new-menu.sh
Created May 31, 2019
Slow windows10 context > new menu
View context-new-menu.sh
Get-AppxPackage *zune* | Remove-AppxPackage
Get-AppxPackage *sketch* | Remove-AppxPackage
Get-AppxPackage *photos* | Remove-AppxPackage
Get-AppxPackage *wallet* | Remove-AppxPackage
Get-AppxPackage *solitai* | Remove-AppxPackage
Get-AppxPackage *bing* | Remove-AppxPackage
Get-AppxPackage *help* | Remove-AppxPackage
Get-AppxPackage *3d* | Remove-AppxPackage
Get-AppxPackage *reality* | Remove-AppxPackage
Get-AppxPackage *office* | Remove-AppxPackage
@dy
dy / infinite-scroll.jsx
Created Apr 23, 2019
Infinite-scroll-react
View infinite-scroll.jsx
import React, { useState, useRef, useMemo } from 'react';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
import Tooltip from '@material-ui/core/Tooltip';
import Paper from '@material-ui/core/Paper';
import MenuList from '@material-ui/core/MenuList';
import MenuItem from '@material-ui/core/MenuItem';
import ListItemText from '@material-ui/core/ListItemText';
import IconButton, { IconButtonProps } from '@material-ui/core/IconButton';
import ArrowLeftIcon from '@material-ui/icons/ArrowLeft';
@dy
dy / async.js
Created Apr 15, 2019
React async hooks
View async.js
import { useCallback, useState, useEffect, useMemo, useRef } from 'react';
/*
Async hooks.
Take in async function & deps,
returns [value, error, loading] object.
*/
const defaultState = [undefined, null, true]
@dy
dy / recuperators.md
Last active Mar 3, 2019
Recuperator table
View recuperators.md
Model Country Efficiency Filter m3/h Ventilator Consumption price
MARLEY MENV-180 Germ
HELIOS KWLR EC 60 Germ
MAICO WRG 35-1-SE Germ
МELTEM M-WRG Germ
ТВИНФРЕШ Ukr
ПРАНА -200G Ukr
УРВК -50 Ru
Двухмоторная установка СПВВР Ru
@dy
dy / why-not
Created Dec 24, 2018
why-not-stackgl (old)
View why-not
# Why not stackgl
Learning WebGL is difficult.
What I’ve understood so far, after 3+ months experience with WebGL?
[stackgl]() is a set of tools somewhere in-between raw WebGL API and graphic frameworks like three.js. But the purpose of these tools is not completely clear.
I guess the motive behing things like gl-shader
## glslify
@dy
dy / hookahpride.svg
Created Aug 17, 2018
Hookah Pride logo
View hookahpride.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.