Skip to content

Instantly share code, notes, and snippets.

View mrowa44's full-sized avatar

Justyna Rachowicz mrowa44

  • Kraków, Poland
View GitHub Profile
{% if bundle.published %}
<div class="sections">
{% assign section = bundle.current_section %}
{% if bundle.sections.size > 0 %}
<div class="section">
<h1>{{ section.name }}</h1>
<p class="section__description">{{section.description}}</p>
<div class="product-box">
{% if section.products %}
{% if bundle.published %}
<div class="sections">
{% assign section = bundle.current_section %}
{% if bundle.sections.size > 0 %}
<div class="section">
<h1>{{ section.name }}</h1>
<p class="section__description">{{section.description}}</p>
<div class="product-box">
{% if section.products %}
@mrowa44
mrowa44 / keybase.md
Created August 17, 2021 12:30
keybase.md

Keybase proof

I hereby claim:

  • I am mrowa44 on github.
  • I am mrowa44 (https://keybase.io/mrowa44) on keybase.
  • I have a public key ASAODL-mZoK8vLshJnDh3J0eLLnwoYNykI0ilQtTvDReqQo

To claim this, I am signing this object:

function checkType(item, test) {
const parsedTest = Array.isArray(test) ? test[0] : test;
return item.constructor === parsedTest;
}
function checkArrayType(value, test) {
const result = [];
value.forEach((item, i) => {
if (typeof item === 'object') {
result.push(checkObjectType(item, test[i]));
@mrowa44
mrowa44 / Example.js
Created February 15, 2018 13:59
React final form wizard better example
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { connect } from 'react-redux';
import * as actions from 'actions/cards';
import { activateCardStep1Validate, activateCardStep2Validate } from 'utils/validate';
import { API_BIRTHDATE_FORMAT } from 'utils/constants';
import Modal, { ModalContent } from 'components/Modal';
import Wizard from 'components/Wizard';
const bees = [2, 4, 5, 6, 1, 3, 2, 4];
function countAges() {
// 1-3
let firstLifeStage = 0;
// 4-6
let secondLifeStage = 0;
bees.forEach((beeAge) => {
if (beeAge >= 1 && beeAge < 3) {
{
"userAgent": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/61.0.3116.0 Mobile Safari/537.36",
"lighthouseVersion": "2.1.0",
"generatedTime": "2017-06-14T11:56:11.633Z",
"initialUrl": "https://tutor24.ch/",
"url": "https://tutor24.ch/",
"audits": {
"is-on-https": {
"score": true,
"displayValue": "",
files:
include: '**/*.s+(a|c)ss'
options:
formatter: stylish
merge-default-rules: false
rules:
bem-depth:
- 1
- max-depth: 1
brace-style:
@mrowa44
mrowa44 / ignore.md
Last active June 5, 2017 16:47
ignore create-react-app build files when you forgotten about that...

.gitignore:

src/**/*.css
!src/index.css
!src/assets
git rm -r --cached . &amp;&amp; git add .
@mrowa44
mrowa44 / node-debug.md
Last active March 8, 2017 17:45
debugging node in devtools with live reloading

Prerequisites: Node.js 6.3+, Chrome 55+, nodeamon

  • turn on chrome://flags/#enable-devtools-experiments & relaunch Chrome
  • open devtools settings > experiments, press shift 6 times (lol, for real) and check node debugging box
  • open & close devtools
  • nodemon --watch . --inspect app.js
  • connect to node in devtools (Sources > Threads (on the right) > Connect next to node)

Debugging tests: mocha --debug-brk --inspect --grep 'something' path/to/test.js