This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Workbox } from 'workbox-window' | |
const init = async () => { | |
console.log('update point - 15') | |
// console.log('sw controller:', navigator.serviceWorker.controller) | |
setInterval(async () => { | |
console.log('sw updated') | |
const registrations = await navigator.serviceWorker.getRegistrations() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid from 'uuid/v4' | |
import DayCountExerciseType from '../repository/DayCountExerciseType' | |
import ExerciseType from '../repository/ExerciseType' | |
const DayCountExerciseTypes = DayCountExerciseType.getAll() | |
const ExerciseTypes = ExerciseType.getAll() | |
export const strongLifts5x5Program = { | |
_id: '1', | |
workout_iteration: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------- | |
https://map.land.gov.ua/rrs/get-object-info | |
Request: | |
x, y, zoom, actLayers[]: kadastr | |
Response: | |
{ | |
"parcel":[{ | |
"koatuu":6821887500, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Old test: | |
cy.visit('/email_messages') | |
cy.contains(FROM_EMAIL).click() | |
cy.findByRole('button', { name: 'Associate user' }).click() | |
cy.findByPlaceholderText('Type user name...').type(USER_NAME) | |
cy.findByRole('option', { name: new RegExp(USER_NAME) }).click() | |
cy.findByRole('button', { name: 'Select' }).click() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Sister from 'sister' | |
var dragStart, | |
dragMove, | |
dragEnd, | |
stopDrop | |
/** | |
* @param {HTMLElement} targetElement | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gifify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fontforge -lang=ff -c 'Open($1); SelectWorthOutputting(); foreach Export("svg"); endloop;' ~/Downloads/font.ttf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { render } from 'react-testing-library' | |
import JssProvider from 'react-jss/lib/JssProvider' | |
const generateClassName = (rule, styleSheet) => | |
`${styleSheet.options.classNamePrefix}-${rule.key}` | |
const customRender = (node, options) => { | |
return render( | |
<JssProvider generateClassName={generateClassName}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.flatten = function () { | |
return this.reduce((list, x) => { | |
if (Array.isArray(x)) { | |
return list.concat(x.flatten()) | |
} else { | |
return list.concat(x) | |
} | |
}, []) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types' | |
import styled from 'styled-components' | |
const Spacer = styled.div` | |
${props => (props.top ? 'margin-top: ' + props.top * 8 + 'px' : '')}; | |
${props => (props.right ? 'margin-right: ' + props.right * 8 + 'px' : '')}; | |
${props => (props.bottom ? 'margin-bottom: ' + props.bottom * 8 + 'px' : '')}; | |
${props => (props.left ? 'margin-left: ' + props.left * 8 + 'px' : '')}; | |
${props => (props.inline ? 'display: inline-block' : '')}; | |
` |
NewerOlder