Useful Git commands and options. git branch -a show current branch and show all branches, -а key means all git branch newbranch — create new branch with name called»newbranch» git branch -f master / — move HEAD of «master» branch to commit with hash or to the HEAD of branch called , if there is […]
Шпаргалка по Git
Полезные команды и параметры утилиты Git. git branch -a посмотреть в какой ветке мы находимся и показать все ветки ключ -а all git branch newbranch — создать новую ветку с именем newbranch git branch -f master / — перенести HEAD ветки master на коммит или на HEAD ветки , если ветки master нет, то создать […]
Find out your IP address
My IP: If you need to quickly obtain external(public) IP address, which your device uses to send requests from, then simply follow this link: https://sysopnotes.net/myip Response is in JSON format: {«ip»:»11.12.13.14″} Request could be performed from browser, as well as using CURL or another HTTP-client. CURL: curl https://sysopnotes.net/myip JavaScript: fetch(‘https://sysopnotes.net/myip’) .then(response => response.json()) .then(data => […]
Определить свой IP адрес
Мой IP: Если необходимо быстро определить внешний(публичный) IP-адрес, с которого ваше устройство выполняет запросы, то можно воспользоваться следующей ссылкой: https://sysopnotes.net/myip Ответ приходит в формате JSON: {‘ip’:’11.12.13.14′} Запрос можно выполнить как в браузере, так и с помощью CURL или другого HTTP-клиента. CURL: curl https://sysopnotes.net/myip JavaScript: fetch(‘https://sysopnotes.net/myip’) .then(response => response.json()) .then(data => alert(data.ip) ); PHP: $ch = […]
Switching WordPress to HTTPS
Sooner or later site owners or developers come to need migrating site from usual HTTP to secured HTTPS connection. In most CMS or frameworks it could be done quite simply, but for WordPress CMS it could become a challenge. The issue is that WordPress keeps site URL in it’s database, moreover most links in Posts […]
Переключение WordPress на HTTPS
Рано или поздно у владельцев или разработчиков сайтов возникает необходимость перевести сайт с обычного HTTP на безопасное HTTPS соединение. Во многих CMS или фреймворках это делается достаточно просто, но для владельцев сайта на базе CMS WordPress это может стать нетривиальной задачей. Все дело в том, что адрес сайта(URL) в WordPress хранится в базе данных сайта […]
JSON datatype and MariaDB
In one of my projects I had MySQL database which had a table with a field of JSON datatype, where I stored form data. All was good until I moved the project from my local server to production. During the database import I’ve got an error of table creation. It was looking like that: […]
JSON тип данных и MariaDB
В одном из проектов в базе данных MySQL у меня было поле с типом данных типа JSON, где хранились данные формы. Все было хорошо до того момента как я перенес проект с локального сервера на рабочий. При импорте базы данных я получил ошибку создания таблицы. Выглядело это примерно так: MariaDB [big_project]> CREATE TABLE testing […]
Setting default product option in Opencart(Opencart Extension)
This Opencart extension lets you choose which product option should be shown by default on product’s page. Tested and works on Opencart 3.0.2.0. It works on the live site, however consider to test it on the test installation to prevent any possible issues. Extension is based on existing similar extension for Opencart 2.3.0.2(Thanks to the author […]
Выбор опции по умолчанию для товара в Opencart(Расширение для Opencart)
Это расширение Opencart позволяет в карточке товара выбрать, какая опция будет показана по умолчанию на странице товара. Протестировано и работает на Opencart 3.0.2.0. Расширение прекрасно работает на «живом» сайте, хотя рекомендую сначала установить его на тестовую версию вашего сайте, чтобы убедиться, что проблем не возникает. Расширение выполнено на базе уже имеющегося для версии Opencart 2.3.0.2(Спасибо автору оригинала […]