#/etc/mysql/mariadb.conf.d/99-custom.cnf
# for 1Gb RAM
# for lightweight OLTP
[mysqld]
# ---------------------------
# BASIC
# ---------------------------
bind-address = 127.0.0.1
skip-name-resolve
max_connections = 40
thread_cache_size = 16
# ---------------------------
# MEMORY CONTROL (1GB RAM)
# ---------------------------
innodb_buffer_pool_size = 512M
innodb_buffer_pool_instances = 1
innodb_log_file_size = 256M
innodb_log_buffer_size = 32M
tmp_table_size = 32M
max_heap_table_size = 32M
# Cron config
```cron
00 03 * * 1 /usr/local/bin/mariadb-optimize.sh
```
In MariaDB 10.6+, `OPTIMIZE TABLE` for InnoDB =
`ALTER TABLE ... FORCE`, i.e., rebuild table.\
**Do not do this often!!!**\
**Recommendation**: once a week during a low-load period.
__ LAZARUS GROUP___
WORLD TIME SELLER
Fresh Logs Pricing
ASIA/EU/UK/US Logs / Clean Bank Drops (GBP/$)
10K GBP/$ = 250
12K GBP/$ = 300
16K GBP/$ = 350
20K GBP/$ = 500
30K GBP/$ = 800
Verified • HQ Access • Fast Delivery
DM for escrow or direct
WESTERN UNION / MONEY GRAM/BANKS LOGINS/BANK TRANFERS/PAYPAL TRANSFERS WORLDWIDE/CASHAPP/ZELLLE/APPLE PAY/SKRILL/VENMO TRANSFER
Telegram:@lazarustoolz
Group: https://t.me/+LE893Ma2vIwyYWNk
Group: https://t.me/+2__ynBAtFP00M2Fk
HELLO#!/bin/bash
#/usr/local/bin/mariadb-healthcheck.sh
DB_USER="healthcheck"
DB_PASS="strong_password_here"
SOCKET="/run/mysqld/mysqld.sock"
LOG_FILE="/var/log/mariadb-healthcheck.log"
DATE=$(date '+%Y-%m-%d %H:%M:%S')
# Ping сервісу
mysqladmin --user="$DB_USER" --password="$DB_PASS" --socket="$SOCKET" ping > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$DATE - MariaDB ping failed. Attempting restart..." >> $LOG_FILE
systemctl restart mariadb.service
sleep 5
mysqladmin --user="$D## Add systemd auto-restart
- Create override config file: \
`touch /etc/systemd/system/mariadb.service.d/auto-restart.conf`
- Add to the file follow text:
```systemd
[Service]
Restart=always
RestartSec=5s
```
- apply changes of unit and restart unit: \
`systemctl daemon-reload`\
`systemctl restart mariadb.service`
## Install geoipupdater
- Install PPA \
`sudo add-apt-repository ppa:maxmind/ppa`
- Install package \
`sudo apt update && sudo apt install geoipupdate -y`
## Configure geoipupdater
- Log in to [maxmind.com](https://www.maxmind.com/en/home)
- Get your [config file](https://www.maxmind.com/en/accounts/current/license-key/GeoIP.conf)
- Get or generate new license key from [here](https://www.maxmind.com/en/accounts/current/license-key)
- Add/Replace/Uncomment in your GeoIP.conf:
- **license ke/**
* @param {number} n
* @return {number}
*/
var concatenatedBinary = function(n) {
const MOD = 1_000_000_007;
let ans = 0;
let bitLength = 0;
let pow2 = 1; // this will always store 2^bitLength % MOD
for (let i = 1; i <= n; i++) {
// If i is a power of two, bitLength increases
if ((i & (i - 1)) === 0) {
bitLength++;
pow2 = (pow2 * 2) % MOD; // update 2^bitLength safely
}
// Shift left by multiplying with pow2 (ins<build>
<plugins>
<!-- FatJar -MVN-Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
test("Dropdown should be sorted in alphabetical order", async ({ page }) => {
await page.goto(PAGE_URL);
const dropdown = page.getByRole("combobox").and(page.locator("#country"));
const options = await dropdown.locator("option").all();
const optionValues = await Promise.all(options.map(option => option.textContent()));
const sortedOptionValues = [...optionValues].sort();
expect(optionValues).toEqual(sortedOptionValues);
});// adding --headed option
npx playwright test tests/singleSelectDropdown.spec.ts --headed// page.getByRole("combobox")
test("Single select dropdown actions", async ({ page }) => {
await page.goto(PAGE_URL);
const dropdown = page.getByRole("combobox").and(page.locator("#country"));
await dropdown.selectOption("India");
});Selects one or multiple options in the <select> element with locator.selectOption(). You can specify option value, or label to select. Multiple options can be selected.
// Single selection matching the value or label
await page.getByLabel('Choose a color').selectOption('blue');
// Single selection matching the label
await page.getByLabel('Choose a color').selectOption({ label: 'Blue' });
// Multiple selected items
await page.getByLabel('Choose multiple colors').selectOption(['red', 'green', '// 1 install
npm install class-variance-authority clsx tailwind-merge
// 2 /lib/utils.ts
/*
clsx handles conditional logic and class composition
tailwind-merge removes conflicting Tailwind classes
*/
import { clsx } from "clsx"
import { twMerge } from "tailwind-merge"
cn("px-2 px-4") // => "px-4"
// 3 variant with cva
import { cva } from "class-variance-authority"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
"rounded px-4 py-2 font-medium transition",
{
variants: {
// 1 install
npm install zustand
// 2 create
// store.js
import { create } from 'zustand';
const useStore = create((set) => ({
count: 0, // Initial state
increase: () => set((state) => ({ count: state.count + 1 })),
decrease: () => set((state) => ({ count: state.count - 1 })),
}));
export default useStore;
// 3 use
// App.js
import React from 'react';
import useStore from './store';
const Counter = () => {
const { count, increase, decrease } = useStore((state) => ({
count: state./**
* @param {string} s
* @param {number} k
* @return {number}
*
* This solution is based on analyzing how many zeros can be flipped per operation.
* Each operation flips exactly k bits, so the parity of the zero count changes
* depending on k. The editorial shows that the minimum number of operations can be
* computed using two candidate formulas depending on parity constraints.
*/
var minOperations = function (s, k) {
const n = s.length;
// Count how many zeros are in the str<?php
declare(strict_types=1);
/**
* ============================================================
* VARIANTA 1
* Jednoduchá request-level cache pomocí static proměnných
* ============================================================
*/
function getExpensiveData(): mixed
{
static $loaded = false;
static $data;
if (!$loaded) {
$data = loadFromDatabase();
$loaded = true;
}
return $data;
}
/**
* =============================