Skip to content

Instantly share code, notes, and snippets.

.tank {
position: relative;
width: 200px;
height: 300px;
border: 3px solid black;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
}
@asimonok
asimonok / result.json
Last active August 8, 2023 20:45
Get Routes Info
{
"searchSpec": {
"itemsType": "avl_route",
"propName": "",
"propValueMask": "",
"sortType": "",
"propType": "",
"or_logic": "0"
},
"dataFlags": 512,
{"index":"product","query":{"bool":{"must":[{"bool":{"should":[{"multi_match":{"query":"123","type":"best_fields","fields":["variants.sku.normalize^6","custom_fields_iso_part_number.value.normalize^5","custom_fields_ansi_part_number.value.normalize^4","name.normalize^3","brand^2","search_keywords.normalize^1"],"boost":2}},{"wildcard":{"name.normalize":"*123*"}},{"wildcard":{"description.normalize":"*123*"}},{"wildcard":{"variants.sku.normalize":"*123*"}},{"wildcard":{"custom_fields_iso_part_number.value.normalize":"*123*"}},{"wildcard":{"custom_fields_ansi_part_number.value.normalize":"*123*"}},{"wildcard":{"search_keywords.normalize":"*123*"}}]}}]}},"fields":["id"],"_source":false,"sort":[],"from":0,"size":9,"aggs":{"category":{"global":{},"aggs":{"filteredFacet":{"filter":{"bool":{"must":[{"bool":{"should":[{"multi_match":{"query":"123","type":"best_fields","fields":["variants.sku.normalize^6","custom_fields_iso_part_number.value.normalize^5","custom_fields_ansi_part_number.value.normalize^4","name.normaliz
/*
** Copyright (c) 2020 Oracle and/or its affiliates.
*/
const fs = require('fs');
const path = require('path');
const {alias, manifest} = require('@oracle-cx-commerce/rollup-config/plugins');
const {babel} = require('@rollup/plugin-babel');
const builtins = require('builtin-modules');
const commonjs = require('@rollup/plugin-commonjs');
@asimonok
asimonok / store.js
Last active January 27, 2021 19:52
const createStore = (reducer) => {}
const counterReducer = (state = { value: 0 }, action) => {
if (action.type === "INCREMENT") {
return {
...state,
value: state.value + 1
};
}
if (action.type === "DECREMENT") {
@asimonok
asimonok / arrayMethods.js
Last active January 22, 2021 16:49
hello
const names = ['Alex', 'John', 'Marie'];
const ages = [20, 30, 25];
const person = {
name: '',
age: 0,
}
const persons = [];
const withLoadingListData = (BaseComponent) =>
class WithLoadingListData extends Component {
state = {
list: [],
isLoading: true,
}
componentDidMount () {
setTimeout(() => {
this.setState({
const createValidation = (...validators) => (value) => {
const errors = validators.reduce((errors, validator) => {
const error = validator(value)
if (error) {
return errors.concat(error)
}
return errors
}, [])
return errors.length > 0 ? errors : null
}
@asimonok
asimonok / chaining.js
Last active December 7, 2020 10:18
JS functional programming
const calc = (value, saveData) => {
if (value >= 5) {
value -= 4
if (value === 1) {
value *= 2
}
} else {
value += 35
}
if (value !== 34) {
localStorage.setItem('EPSON', JSON.stringify({"state":{"routing":{"locationBeforeTransitions":{"pathname":"/auth/login","search":"","hash":"","action":"POP","key":null,"query":{}}},"entities":{},"apiData":{},"auth":{"token":{"value":{"role":null,"access":null,"refresh":null},"loading":false,"loaded":false},"error":null},"alerts":{"items":[]},"calls":{"twilioLoading":false,"incomingCalls":[],"currentCalls":{},"chats":{},"timers":{},"galleries":{},"modals":{}},"localization":{"lang":"en-US","localTexts":{
"company.companyInfoForm.addCreditCardLink": "Add Credit Card",
"company.create.addLicenseKey.form.backButton": "Back",
"company.create.addLicenseKey.form.codeLabel": "License Key (case sensitive, enter all dashes/hyphens)",
"company.create.addLicenseKey.form.hint": "Please enter your license key to complete account set-up:",
"company.create.addLicenseKey.form.incorrectTimesHint": "If you enter the incorrect license key 3 times, you will be redirected to the earlier page.",
"company.create.addLicen