This file contains hidden or 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
// EXPERIMENTAL STUFF (not working) - tests are failing | |
// truly recursive drill down for arrays | |
export const dda = pos => ctx => visitor => { | |
console.log('pos', pos); | |
console.log('ctx', ctx); | |
console.log('visitor', visitor); | |
return [ | |
...ctx.slice(0, pos), | |
visitor(), | |
...ctx.slice(pos + 1) |
This file contains hidden or 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 { | |
LineChart, | |
Line, | |
XAxis, | |
YAxis, | |
CartesianGrid, | |
ReferenceLine, | |
Tooltip, | |
} from 'recharts'; |
This file contains hidden or 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
# THIS IS THE PANE LAYOUT CREATED | |
# pane numbers are relative to the end of the actions | |
# _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
# | pane 0 | pane 1 | | |
# | | | | |
# | |- - - - - - - - | | |
# | | pane 2 | | |
# | | | | |
# | |- - - - - - - - | | |
# | | pane 3 | |
This file contains hidden or 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 { useEffect, useRef } from 'react'; | |
function useDelayedEffect(effect, changingStateVars = [], delay = 1000) { | |
const mutable = useRef(); | |
const delayedEffect = () => { | |
mutable.current = setTimeout(effect, delay); | |
return () => { | |
clearTimeout(mutable.current); |
This file contains hidden or 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
#! /bin/bash | |
for file in `find . -name "*.scss"`; do git log --stat --oneline --pretty=format:"%cd" $file >> pippo3.txt; echo '------' >> pippo3.txt; done | |
for file in `find . -type f -name "*.js" ! -name "*.stories.js"`; do git log --stat --oneline --pretty=format:"%cd" $file >> pippo4.txt; echo '------' >> pippo4.txt; done |
This file contains hidden or 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
cat urls.txt | while read url; do wget -mpEkL "$url"; sleep 2; done |
This file contains hidden or 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 PropTypes from 'prop-types'; | |
import './Icon.scss'; | |
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | |
const Icon = ({ icon: iconName, color, backgroundColor, ...rest }) => { | |
const faIconName = `fa${iconName.replace(/./, c => c.toUpperCase())}`; | |
const faIcon = require(`@fortawesome/pro-light-svg-icons/${faIconName}.js`)[faIconName]; | |
return ( |
This file contains hidden or 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
export function playSwipeInAnimation(element, height) { | |
const ANIMATION_DURATION = 500; | |
const TIMING = { | |
duration: ANIMATION_DURATION, | |
fill: 'forwards', | |
easing: 'cubic-bezier(0.42,0,0.58,1)', | |
}; | |
This file contains hidden or 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 { call, put, takeLatest, take, race } from 'redux-saga/effects' | |
import { | |
SWITCH_BIOMETRIC_UNLOCK_REQUEST, | |
SWITCH_BIOMETRIC_UNLOCK_REJECTED, | |
SWITCH_BIOMETRIC_UNLOCK_SUCCESS, | |
} from './Preferences.actions' | |
import { | |
CLOSE_PASSWORD_MODAL, | |
OPEN_PASSWORD_MODAL, | |
PASSWORD_VALIDATED, |
This file contains hidden or 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 ReactDOM from 'react-dom' | |
import { Input } from 'react-onsenui' | |
export default class DataField extends React.Component { | |
componentDidMount() { | |
this.focusHandler = this.mainInputFocusEventHandler.bind(this) | |
if (this.mainInput) { |
NewerOlder