MySQL 8, cloning instances for replication using CLONE statement
The number of manual steps to setup a replication is high, especially when the source server databases snapshot is performed. As of MySQL 8.0.17, the new CLONE plugin simplifies the replica provisioning. Some limitations to notice, otherwise the CLONE plugin is easy to use and cloning operations can even be monitored. Very useful for duplicating environments, not only for replication.
MySQL 8, binary log file position based replication. Getting started, Quick setup
MySQL 8, binary log file position based replication. Getting started, Quick setup. Some MySQL 8 particularities are discussed :
- terminology is being modified in MySQL products, change impacting mostly replication.
- side effect on replication of the new
- read only mode per database, new feature as of MySQL 8.0.22.
Locales on Ubuntu, languages configuration
In most programming languages, it is convenient to use locale settings for displaying numbers, dates… Locale settings avoid developing functions to format data. The major inconvenient : locale settings are OS dependent. If a requested locale is not installed on the OS where the program runs, formatting will fail or will fallback to default settings. A quick overview about locale settings on Ubuntu : installation, temporary or permanent modification.
Python - Understanding args, kwargs in functions
Beginning in Python, we encounter code examples with the syntaxes
**kwargsin function arguments. Used to other languages : what’s that ? pointers in Python ?
**kwargsallow multiple arguments and named arguments to be passed to a function. Nothing really rocket science. In this article,
**kwargsexplained through simple examples, and at the same time, a quick word about the unpacking operators * and **.
Python - Practical Handbook, Quick reference guide
A Python cheat sheet on some packages, quick reference guide to be completed over time :
- Handling JSON data
- Programs arguments (argparse)
- INI files (configparser), YAML files (PyYAML)
- HTTP requests (packages requests and httplib2) …
MathJax - Tex : Quick Reference Guide
More efficient than a long tutorial, examples of MathJax / Tex equations in the most common situations.
- Piecewise functions
- Centering equations on the sign =
- Numbering equations, bookmarks and hyperlinks
- And more to come by the time…
Using CSS variables to change a page style without reloading
Find and Grep utilities
The powerful find and grep utilities on Unix/Linux : usage and practical examples. Beyond the basic cases, the examples address more complex needs with sometimes the power of regular expressions. A few examples covered : deleting files based on criteria, computing the size of images in a directory, finding invalid symbolic links. This paper is quite old (first version in 2002) but is enriched by the time with examples of interest to remember.
awk, nawk and gawk utilities - Tutorial
The awk, nawk and gawk (GNU Awk) utilities are very easy to use text file parsers. They handle efficiently text files of data delimited by a character. With an easy syntax to understand, operations for filtering rows, filtering columns, enriching content, converting formats, computing aggregates (averages, sums for example), etc. become child’s play with these utilities. awk, gawk and nawk differ only in a few very advanced features. awk is the utility to use without hesitation to parse very efficiently in seconds complex log files for example. Getting started with the nawk utility through examples, and contrary to common beliefs it is also available on Windows platforms.
Google PageSpeed - LightHouse 6, new features CLS (Cumulative Layout Shift) and LCP (Largest Contentful Paint)
Web pages performance metrics are modified in LightHouse 6, they are more realistic and close to the user experience. A very interesting metric is introduced: CLS (Cumulative Layout Shift). The CLS statistics quantify the visual stability of web pages to avoid bad user experiences. All the tools are available with Chrome and LightHouse to diagnose the elements concerned in the visual instability of a page and in a few steps, the CLS score can be optimized, but everything will of course depend on the complexity of the pages and code.
Mathematical expressions and equations in HTML with MathJax and AsciiMath
Measuring and storing pages performance metrics using Google PageSpeed Insights API and Python
Page speed is one of the key criteria in Google search engines ranking algorithms. The API Google PageSpeed Insights gives the ability to retrieve programmatically page speed LightHouse results executed on web pages from Google labs. With few Python code lines, the valuable statistics can be extracted and stored in a table for historization : useful when planning benchmarks before/after upgrades, updates.
Python, application configuration - environment variables, ini and YAML files
Obviously, no hard-coded application configuration in programs, Python programs or not. How to read (write) configuration data with Python from environment variables, INI files or YAML files? The os, configparser and PyYAML packages meet these needs. configparser for INI files and yaml for YAML files have their advantages and inconvenients if we venture to compare these 2 packages to make a choice. The JSON format is not discussed here, a dedicated article is published on this topic.
Python, handling dictionaries with dot notation
Python, Managing HTTP requests with the packages requests and httplib2
HTTP requests with the GET or POST method are widely used when exchanging data through programming API. With Python, 2 interesting packages for executing HTTP requests: requests and httplib2. The requests package is the easiest syntactically and natively includes a JSON decoder. About the httplib2 package, a very interesting feature: a caching mechanism to avoid unnecessary network calls in some application contexts using relatively static data.
Python, Parsing arguments with the packages argparse and getopt
2 native packages are available with Python to efficiently manage the command lines and arguments of a Python program: argparse and getopt. argparse is by far the most advanced package and offers the most productivity, about getopt a very strong resemblance to its habits when handling arguments in shell or in C language.
Python, Reading and writing JSON with the package json
When developing a Web site, event listeners are implemented, by third party libraries or by your own. In some circumstances, when starting performance improvements tasks or when debugging behavior issues in event listeners due to a third party library, we may need to get an overview of all event listeners. How to get the full list : the events defined with addEventListener and the ones defined with the corresponding attribute ? It's not so trivial.
Standalone MariaDB ColumnStore 1.2.3 installation on Ubuntu - Getting started
In order to discover the product, the installation of a standalone MariaDB ColumnStore system on Ubuntu is rather simple. Getting started is also quick with the combination of the mcsadmin and mcsmysql utilities. A technical starting point on this column-oriented database for real-time analytical processing of distributed and very high volume data.
How to list members of an Active directory group defined in Microsoft SQL Server
Project managers often directly ask the DBAs to provide the list of accounts belonging to a Microsoft Active Directory group defined in Microsoft SQL Server. Basic command lines exist (net group, net user) to list the members without having to disturb the administrators of the Active Directory domain controller (AD).