Skip to content

Instantly share code, notes, and snippets.

View kirill-zhirnov's full-sized avatar
🎯
Focusing

Kirill Zhirnov kirill-zhirnov

🎯
Focusing
View GitHub Profile
COMPOSE_PROJECT_NAME=boundless
NODE_ENV=production
POSTGRES_PASSWORD=123
DB_HOST=db
RABBIT_MQ_HOST=rabbitmq
RABBIT_MQ_USER=guest
RABBIT_MQ_PASS=guest
version: '3.6'
services:
db:
image: kirillzh87/boundless-commerce-db:latest
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
healthcheck:
test: pg_isready -U postgres
interval: 10s
timeout: 5s
{
"ORDER_URL": "http://localhost:3000/thank-you/46ce25ce-37e1-4081-a737-420cb7dfe61b",
"ORDER_ID": 29,
"ORDER_PUBLIC_ID": "46ce25ce-37e1-4081-a737-420cb7dfe61b",
"ORDER_SUM": "45.00 $",
"TRACK_NUM": "",
"CUSTOMER_FULLNAME": "John Snow",
"CUSTOMER_FIRSTNAME": "John",
"CUSTOMER_COMMENT": "Some comment from Ivan",
"ITEMS_LIST": "<div id=\"order-notification\"><div class=\"view-order-widget\" id=\"s-0\"><table class=\"table table-bordered table-hover table-striped\"><thead><tr><th class=\"item\"></th><th class=\"price\">Price</th><th class=\"qty\">Qty</th><th class=\"total\">Total</th></tr></thead><tbody><tr data-item='3650'><td class=\"item\"><a href=\"http://localhost:3000/product/chekhol-akkumulyator-odoyo-power-shell-dlya-iphone-6-6s\" target=\"_blank\" class=\"img\"><img src=\"https://dev-media.boundless-commerce.com/thumb/kirill-office-mac/i1/images/a1/ae/ace20b14fe947ff13822f97a82ac.jpeg?mode=scale&amp;max-size=100\"></a><div class=\"desc\"><p><a href=\"http://localhost:3000/product/chekhol-akkumu
import axios from 'axios';
import {v4 as uuidv4} from 'uuid';
/**
* @param {File} file - file is instance of https://developer.mozilla.org/en-US/docs/Web/API/File
* @returns {Promise<{}>}
*/
export async function runChunkUpload(file) {
const chunkSize = 5 * 1024 * 1024;
const size = file.size;
/**
* @param {File} file - file is instance of https://developer.mozilla.org/en-US/docs/Web/API/File
* @returns {Promise<axios.AxiosResponse<any>>}
*/
export function uploadFullFile(file) {
const formData = new FormData();
formData.append('file_name', file.name);
formData.append('file', file);
formData.append('for_product_id', 194);
// Why would the following code block your Flutter app?
String playHideAndSeekTheLongVersion() {
var counting = 0;
for (var i = 1; i <= 1000000000; i++) {
counting = i;
}
return '$counting! Ready or not, here I come!';
}
// You’re making a shopping app called RubberBaby, which sells dolls. Unfortunately, you’ve run into a
// problem on the order page. If a customer makes one order for blue dolls and another order for red dolls but then tries
// to delete the blue doll order, the red doll order is wrong.
// https://koenig-media.raywenderlich.com/uploads/2020/06/buggy_buttons.gif
class OrderPage extends StatefulWidget {
@override
_OrderPageState createState() => _OrderPageState();
}
class MyWidget extends StatelessWidget {
final personNextToMe = 'some long text some long text some long text some long text some long text some long text some long text some long text some long text some long text...';
@override
Widget build(BuildContext context) {
return Row(children: [
Icon(Icons.airline_seat_legroom_reduced),
Text(personNextToMe),
Icon(Icons.airline_seat_legroom_reduced),
]);
const thumb = apiClient.makeThumb({imgLocalPath, maxSize});
//Set quality:
thumb.setQuality('<low | normal | hight>');
//set ratio:
thumb.setRatio('<1-1 | 2-3 | 3-2 | 4-5 | 5-4 | 3-4 | 4-3 | 16-9 | 9-16>');
//set pad: boolean
thumb.setPad(value);
import {IMenuItem} from '../@types/components';
import MainLayout from '../layouts/Main';
import {GetServerSideProps} from 'next';
import {apiClient} from '../lib/api';
import {makeAllMenus} from '../lib/menu';
export default function BioPage({mainMenu, footerMenu}: IAboutPageProps) {
return (
<MainLayout mainMenu={mainMenu} footerMenu={footerMenu}>
<div className='container'>