Skip to content

Instantly share code, notes, and snippets.

clickhouse-client --query "INSERT INTO order_items FORMAT TSV" < production.order_items.tsv
@reindert-vetter
reindert-vetter / Endpoint v2 checkouts.md
Created November 16, 2023 14:03
Checkout v2 endpoints
  1. ssh job-03 (for prod)
  2. screen (for prod)
  3. cd /var/www/vhosts/default_production/current && php artisan horizon:pause-supervisor supervisor-tmp-stats-normal && rm storage/logs/laravel.log && touch storage/logs/laravel.log && php artisan migrate:rollback-and-migrate-specific --path modules/Statistics/Database/Migrations/2022_05_13_106623_clickhouse_create_view_subscriptions_updated.php,modules/Statistics/Database/Migrations/2022_05_13_106626_clickhouse_create_view_subscription_mutations.php --down=true --up=true && php artisan maintenance:fill-stats --model=installments_contracts && php artisan horizon:continue-supervisor supervisor-tmp-stats-normal
@reindert-vetter
reindert-vetter / OrderHistoryHandlersPipe.php
Last active June 1, 2023 10:26
order history handlers
<?php
namespace App\Services;
use Carbon\Carbon;
class OrderHistoryHandlersPipe
{
const PROVIDERS = [
CommentsHandlerProvider::class,

Introduction

For how to handle the exceptions correctly, see Exceptions.

Show

To load more information see Extra Information.

use \PlugAndPay\Sdk\Service\Client;
use \PlugAndPay\Sdk\Service\OrderService;

Introduction

This is a PHP SDK to make easier to communicate with the Plug&Pay API.

Not all functionalities are present. If you're missing something, feel free to request it through our Discord channel.

Requirements

  • The Plug&Pay SDK works with PHP version >= 7.4.
@reindert-vetter
reindert-vetter / retention-response.json
Last active July 20, 2022 11:56
Retention response /v2/statistics/retention?from=2020-01&until=2020-04
[
{
"cohort": "2020-01",
"after": 0,
"count": 100,
"rate": "100.0",
"mutation_rate": null
},
{
"cohort": "2020-01",

⌘+1

Navigate in project directories image Tool Windows | Project image

⌘+2

Navigate to method image Main Menu | Navigate | File Structure

{
"id": "1",
"billing_address": {
"name": ""
"street": ""
},
"created_at": "2021-01-01 12:00:00",
"custom_fields": null,
"customer": [
"email": "agustina@example.com",
const WEEKDAY_MONDAY = 1;
/**
* Get drop off date
*
* @param int $dateTime
* @return int
*/
public function getDropOffDateTimeFromDeliveryDateTime($dateTime)
{