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 […]
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 => […]
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 […]
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: […]
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 […]
Adding domain to Cpanel account
Adding domain to Cpanel account During creation of Cpanel account in WHM a new domain is being created as a main account domain. Then needed subdomains could be easily created in Cpanel interface. There is corresponding subsection which is called Subdomains. Sometimes there is need to create additional domains in the same Cpanel account(not subdomains […]
Cloudflare and visitors IP addresses
Cloudflare reverse proxy Cloudflare very popular service, which provides many necessary and useful services. Maybe most popular service is their reverse proxy, which allows you to put your site behind cloud caching proxy servers. This gives possibility to reduce load on the site and make content output more faster. But you may also face the […]
Google API 403 Forbidden
During migration of webapp( which used Google API) from old server to a new one we faced a problem that part of dynamic content dissapered, it was a content which was generated using Google API. In our case the key was linked to IP-addresses of the servers where the app works. So first of all […]
Disabling Firewalld in CentOS7
CentOS7 by default uses Firewalld as network filter. It’s a kind of add-on over Iptables. According to its description it has quite wide functionality and usability. But I prefer to work with Iptables rules directly. It’s more understandable for me when I write all rules by myself. But it is individual for each, I can’t bring […]
WordPress password reset
Here I will describe several ways to reset administrator’s account password in WordPress CMS, those ways could be called radical, because they are being used in cases when you couldn’t reset password in user’s profile or via embedded password recovery option of WordPress. I’ll not touch last two mentioned methods, as long as I suppose […]