Skip to content

Instantly share code, notes, and snippets.

View cergey-obr's full-sized avatar

Sergey Obraztsov cergey-obr

View GitHub Profile
dev@dev-System-Product-Name:~$ docker logs --tail 50 glassesusa.local_ssr
Node server is listening on port 8080!
Node server is listening on port 8080!
(node:1) UnhandledPromiseRejectionWarning: FetchError: invalid json response body at https://glassesusa.local/ms/route/1/womens-eyeglasses reason: Unexpected token < in JSON at position 0
at /home/node/app/server.js:454:27542
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /home/node/app/server.js:454:21674
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1) [DEP0018] Deprec
dev@dev-System-Product-Name:~$ docker logs --tail 50 nginx
172.18.0.11 - - [18/May/2020:08:47:49 +0000] "GET /customer/api/current/ HTTP/1.0" 200 4101 "https://uvp.local/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36"
172.18.0.1 - - [18/May/2020:08:47:49 +0000] "GET /backend/customer/api/current/ HTTP/2.0" 200 1740 "https://uvp.local/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36"
172.18.0.1 - - [18/May/2020:08:47:49 +0000] "GET /src/img/ec77eece47beb8840040531a2c2aebee.jpg HTTP/2.0" 200 100107 "https://uvp.local/src/styles.3264262f35d3ba9535ff.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36"
172.18.0.1 - - [18/May/2020:08:47:49 +0000] "GET /src/img/bdd82cf39caf6039fce07e1c69d3fad5.gif HTTP/2.0" 200 17652 "https://uvp.local/src/styles.3264262f35d3ba9535ff.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gec
SELECT `main_table`.*,
`default_option_title`.`title` AS `default_title`,
`store_option_title`.`title` AS `store_title`,
IF(store_option_title.title IS NULL, default_option_title.title,
store_option_title.title) AS `title`,
`default_option_price`.`price` AS `default_price`,
`default_option_price`.`price_type` AS `default_price_type`,
`store_option_price`.`price` AS `store_price`,
`store_option_price`.`price_type` AS `store_price_type`,
<?php
namespace App\Service;
class DbService
{
/**
* @var mysqli
*/
private static $connection;
@cergey-obr
cergey-obr / payments_os_bill.php
Created March 19, 2019 07:31
Bill with payments os
<?php
public function billAction()
{
/** @var Glassesusa_Sales_Model_Order $order */
$order = Mage::getModel('sales/order')->load(136);
if (!$order->getId() && $order->isHto()
&& $order->getStatus() !== Glassesusa_Sales_Model_Order::STATUS_HTO_PERIOD_OVER) {
Mage::throwException('Order not available for billing');
@cergey-obr
cergey-obr / zooz.php
Created March 19, 2019 06:04
Migrate customer tokens
<?php
require_once 'abstract.php';
class Optimax_Shell_Zooz extends Mage_Shell_Abstract
{
const MIGRATE_URL = 'https://app.zooz.com/mobile/optimax_migrate_token.jsp';
public function run()
{
mage: node:6.9.0
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- node --version
- npm --version
- npm install -g gulp ts-node typescript typings
- npm install --unsafe-perm
@cergey-obr
cergey-obr / yamap_1_1.html
Last active January 6, 2018 18:38
polyline from base64
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Примеры. Создание ломаной из закодированных вершин.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://api-maps.yandex.ru/1.1/index.xml" type="text/javascript"></script>
<script type="text/javascript">
YMaps.jQuery(function () {
var map = new YMaps.Map(YMaps.jQuery("#YMapsID")[0]);
map.setCenter(new YMaps.GeoPoint(37.591298, 55.734172), 16);
<?php
class SNQ_Catalog_Helper_Catalog_Product_List extends SNQ_Catalog_Helper_Data
{
const SALE_AMOUNT_SORT_FIELD = 'sale_amount';
const DEFAULT_SORT_FIELD = 'position';
/**
* @param Mage_Catalog_Model_Resource_Product_Collection $collection
@cergey-obr
cergey-obr / cli-loader.php
Created October 30, 2017 13:19
Snippet to emulate a little loading char in terminal
<?php
$chars = ["|","/","-","\\"];
$milisecondsToWait = 100;
for($i = 0;$i < count($chars);$i++)
{
echo "\r";
echo $chars[$i];