Skip to content

Instantly share code, notes, and snippets.

@bodia-uz
bodia-uz / withLogger
Created October 22, 2019 09:48
withLogger
function mPatch(object, fnProperty, { onBefore, onAfter }) {
const originFn = object[fnProperty];
object[fnProperty] = (...args) => {
if (typeof onBefore === 'function') {
onBefore(...args);
}
const returnValue = originFn(...args);
Root
Inactive*
reviewRegions -> Regions
reviewTwoOptions -> TwoOptions
Active
Question
Regions
RegionsReview*
close -> Inactive
@bodia-uz
bodia-uz / SketchSystems.spec
Last active November 20, 2018 19:43
Wizard
Wizard
new -> Input
Input
Onboarding*
next -> Import
Media
Import
back -> Onboarding
next -> Upload & Choose
WEBVTT FILE
1
00:00:03.500 --> 00:00:05.000 D:vertical A:start
Everyone wants the most from life
2
00:00:06.000 --> 00:00:09.000 A:start
Like internet experiences that are rich <b>and</b> entertaining
3
00:00:11.000 --> 00:00:14.000 A:end
Phone conversations where people truly <c.highlight>connect</c>
const NOTIFICATION_GRUNTED = "granted";
const NOTIFICATION_DENIED = "denied";
const NOTIFICATION_DENIED_MESSAGE = "Notification permission denied";
const NOTIFICATION_UNSUPPORTED_MESSAGE =
"Desktop notifications not available in your browser. Try Chromium.";
function initNotifications() {
return new Promise((resove, reject) => {
switch (Notification && Notification.permission) {
case undefined:
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
// NOTE: `transition-duration` for modal css-animation is less then 500 ms
const MODAL_TRANSITION_DELAY = 500;
class ModalWithState extends Component {
constructor(props) {
super(props);
import {
isAbsoluteURL,
isTrustedURL,
appendParamsToURL,
redirectToURL
} from '../url-fns';
class LoginController {
/*@ngInject*/
constructor($rootScope, $log, $state, commonAuthUser) {
{
"context": "/PATH_TO_MY_APP/node_modules/PATH_TO_LIB/site",
"node": {
"__filename": true
},
"entry": {
"main": "/PATH_TO_MY_APP/node_modules/PATH_TO_LIB/site/.cache/develop-static-entry"
},
"debug": true,
"target": "node",
@bodia-uz
bodia-uz / Items.js
Last active September 8, 2017 09:32
js http polling
import React, { Component } from 'react';
import isEqual from 'lodash/isEqual';
import ItemsList from './ItemsList';
import createPolling from './createPolling';
class Items extends Component {
constructor(props) {
super(props);