Skip to content

Instantly share code, notes, and snippets.

View petyappetrov's full-sized avatar
🏇
Work hard - play hard

Petr Petrov petyappetrov

🏇
Work hard - play hard
View GitHub Profile
@petyappetrov
petyappetrov / useRecaptcha
Last active January 27, 2021 05:59
Google reCAPTCHA V2 invisible mode make in React Hooks
import { useCallback, useEffect, useRef } from "react";
const RECAPTCHA_SCRIPT_URL = "https://www.google.com/recaptcha/api.js";
const RECAPTCHA_SIZE = "invisible";
const RECAPTCHA_RESPONSE_KEY = "responseCallback";
const RECAPTCHA_EXPIRED_KEY = "expiredCallback";
import React, { useState, useEffect } from 'react'
import { createPortal } from 'react-dom'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { useSpring, animated, config } from 'react-spring'
const Overlay = styled(animated.div)`
position: fixed;
top: 0;
bottom: 0;
/////////////////////////////////////////////////////////////////////////////////////////
function sequence (start, step) {
return function () {
return start += step
}
}
/////////////////////////////////////////////////////////////////////////////////////////
function square (a) {
return a * a
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2016 Quantron Systems LLC.
// All Rights Reserved.
//
// This file is part of the Pakmil project.
// For conditions of distribution and use,
// please contact sales@quantron-systems.com
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2016 Quantron Systems LLC.
// All Rights Reserved.
//
// This file is part of the Pakmil project.
// For conditions of distribution and use,
// please contact sales@quantron-systems.com
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2016 Quantron Systems LLC.
// All Rights Reserved.
//
// This file is part of the Pakmil project.
// For conditions of distribution and use,
// please contact sales@quantron-systems.com
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@petyappetrov
petyappetrov / logs
Last active September 27, 2016 13:31
[2016-09-27 16:23:10] [2be1134a] [bcm.vanare.loc] request.INFO: Matched route "oro_user_security_login" (parameters: "_controller": "Vanare\WebsiteBundle\Controller\LoginController::loginAction", "_route": "oro_user_security_login")
[2016-09-27 16:23:10] [2be1134a] [bcm.vanare.loc] security.INFO: Populated SecurityContext with an anonymous Token
[2016-09-27 16:23:15] [2c366dae] [bcm.vanare.loc] request.INFO: Matched route "_wdt" (parameters: "_controller": "web_profiler.controller.profiler:toolbarAction", "token": "fa086b", "_route": "_wdt")
////////////////////////////////////////////////////////////////////////////////////////////////////
var gulp = require('gulp');
var path = require('path');
var changed = require('gulp-changed');
var sourcemaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var runSequence = require('run-sequence');
var shell = require('gulp-shell');
var composer = require('gulp-composer');
var postcss = require('gulp-postcss');
<div class="clearfix"></div>
<div class="progress-labels-block__wrap">
<ul class="progress-labels-block">
<li class="progress-labels-block__item "><span class="tick tick_white"></span><a href="/grow/account/create/8889/workflow/0">
Account Type
</a></li><li class="progress-labels-block__item "><span class="tick tick_white"></span><a href="/grow/account/create/8889/workflow/1">
Account Owner Info
</a></li><li class="progress-labels-block__item "><span class="tick tick_white"></span><a href="/grow/account/create/8889/workflow/7">
Funding
</a></li><li class="progress-labels-block__item progress-labels-block__item_active"><span class="tick tick_white"></span><a href="/grow/account/create/8889/workflow/9">
---
rules:
at-rule-name-case: lower
at-rule-no-vendor-prefix: true
at-rule-semicolon-newline-after: always
block-closing-brace-newline-after: never-single-line
block-closing-brace-newline-before: always
block-no-empty: true
block-no-single-line: true
block-opening-brace-newline-after: always