Skip to content

Instantly share code, notes, and snippets.

View noff's full-sized avatar

Michael Kechinov noff

  • REES46
View GitHub Profile
@noff
noff / Commands
Created July 21, 2020 18:25
Measure PHP vs Ruby
> time ruby rotate.rb
> time php rotate.php
[["Afghanistan", "AF"], ["Albania", "AL"], ["Algeria", "DZ"], ["American Samoa", "AS"], ["Andorra", "AD"], ["Angola", "AO"], ["Anguilla", "AI"], ["Antarctica", "AQ"], ["Antigua and Barbuda", "AG"], ["Argentina", "AR"], ["Armenia", "AM"], ["Aruba", "AW"], ["Australia", "AU"], ["Austria", "AT"], ["Azerbaijan", "AZ"], ["Bahamas", "BS"], ["Bahrain", "BH"], ["Bangladesh", "BD"], ["Barbados", "BB"], ["Belarus", "BY"], ["Belgium", "BE"], ["Belize", "BZ"], ["Benin", "BJ"], ["Bermuda", "BM"], ["Bhutan", "BT"], ["Bolivia (Plurinational State of)", "BO"], ["Bonaire, Sint Eustatius and Saba", "BQ"], ["Bosnia and Herzegovina", "BA"], ["Botswana", "BW"], ["Bouvet Island", "BV"], ["Brazil", "BR"], ["British Indian Ocean Territory", "IO"], ["Brunei Darussalam", "BN"], ["Bulgaria", "BG"], ["Burkina Faso", "BF"], ["Burundi", "BI"], ["Cabo Verde", "CV"], ["Cambodia", "KH"], ["Cameroon", "CM"], ["Canada", "CA"], ["Cayman Islands", "KY"], ["Central African Republic", "CF"], ["Chad", "TD"], ["Chile", "CL"], ["China", "CN"], ["Chri
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=617
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=618
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=619
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=620
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=621
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=622
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0a78d62&shop_id=e8030027c16f7041c15db2da3bbd47&seance=wildberries&id=624
https://api.rees46.com/banner?ssid=068924bd-4a1e-4c31-bdee-8550a0
@noff
noff / IRR
Created February 19, 2015 08:06
calculate = (valid = true) ->
# процент первого взноса от стоимости
calc_out.paid_pct = Math.round(100 * calc_in.paid / calc_in.total) + '%'
# подключаем библиотеку
calFinance = new Finance()
if calc_in.increase != null
//
// ViewController.m
// BunchTestObjectiveC
//
// Created by Михаил Кечинов on 16/12/14.
// Copyright (c) 2014 M.Kechinov's web-development studio, LLC. All rights reserved.
//
#import "ViewController.h"
#import "BNCHBunch.h"
@noff
noff / gist:e035487c5f6926dfaf44
Created October 28, 2014 07:09
Определение цены товара
$item_id = intval($item_id);
$item = $libCatalogProduct->GetByIDEx($item_id);
$currency_code = 'RUB';
$picture = null;
// Получаем цену товара или товарного предложения
if(CCatalogSku::IsExistOffers($item_id)) {
// Для товарных предложений просто не показываем цену
<?php
namespace Rees46\Component;
use CCatalogProduct;
use CFile;
use CModule;
use CCatalogDiscount;
use CCatalogSKU;
use Rees46\Options;
@noff
noff / poll-data.json
Last active July 3, 2017 21:50
Demo poll structure
{
"id": 2,
"title": "Feature phone Demo Module",
"description": null,
"questions": [
{
"id": 1,
"start": true,
"input": "radio",
@noff
noff / gist:10111433
Created April 8, 2014 11:22
CSS for Ortmen
.rees46-recommend .recommender-block-title {
width: 248px;
height: 23px;
background: url("/images/special_header.png") no-repeat 0 0;
font-size: 18px;
line-height: 23px;
font-weight: 500;
color: #FFF;
text-align: center;
margin: 15px auto 20px;
1,101,5.0
1,102,3.0
1,103,2.5
2,101,2.0
2,102,2.5
2,103,5.0
2,104,2.0
3,101,2.5
3,104,4.0
3,105,4.5