A/B Testing

ab -n 100 -c 10 "https://keinundaber-website-stage.os4.drei.io/buecher?orderBy=releaseDate_DESC&programArea=1468"

Typio Fix

For a quick-fix you can use 'Chrome extension source viewer' to download the plugin 
as a zip, then unzip and open content.js, add the following code at the end, save, 
then go to chrome plugins, enable developer mode at the top & click load unpacked, 
select the plugin directory with the edited content.js:

Object.defineProperty(Event.prototype, 'path', {
  get: function() {
    return this.composedPath();
  }
});

Disabled auto generating p element in CF7

/*
 * Disabled auto generating p element in CF7
*/
define('WPCF7_AUTOP', false );

BinarySerializer

using System.IO;
using System.Threading.Tasks;
public class BinarySerializer<T>{
	
    public async Task SaveBinaryDataAsync(T data, string filePath)
    {
        using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
        using (BinaryWriter writer = new BinaryWriter(fileStream))
        {
            await WriteDataAsync(data, writer);
        }
    }
    public async Task<T> LoadBinaryDataAsync(string filePath)
    {
        using (FileStream fileStream = new FileStream

SQLite Clone DB

Sometimes there are issues with the SQLite db, e.g. if the db is in an inconsistent state.
In this cases it might help to clone the contents of the database and 
replace the database with the cloned one.

E.g. if you run Grafana, exec into the container and run

```sh
sqlite3 grafana.db '.clone grafana-new.db'
mv grafana.db grafana-old.db
mv grafana-new.db grafana.db
```

管理画面サイドバー 並び替え

プラグインを使用せず、コードで対応する場合。 ・functions.phpに記述する ・記載しなかったメニュー項目は設定したメニューの一番下に配置される (表示されないわけではない)
// メニューの並び替え
function my_custom_menu_order($menu_order) {
    if (!$menu_order) return true;
    return array(
        'index.php', //ダッシュボード
        'separator1', //セパレータ1
        'edit.php', //投稿
        'edit.php?post_type=カスタムポストのスラグ', //カスタムポスト
        'separator2', //セパレータ2
        'edit.php?post_type=page', //固定ページ
        'edit-comments.php', //コメント
        'separator-last', //最後のセパレータ
        'themes.php', //外観
        'plugins.php', //プラグイン
        'users.php', //ユーザー
        'tools.ph

Переворот строки на php, которая содержит кириллицу

function reverse($str)
{
    $index = strlen($str) - 1;
    $reversedString = '';

    while ($index >= 0) {
        $currentChar = $str[$index];
        $reversedString = "{$reversedString}{$currentChar}";
        $index = $index - 1;
    }

    return $reversedString;
}

authentification.js

// bcrypt et jsonwebtoken

Unity Package Manifest

[Package manifest](https://docs.unity3d.com/current/Manual/upm-manifestPkg.html) [Creating samples for packages](https://docs.unity3d.com/current/Manual/cus-samples.html)
{
    "name": "com.[company-name].[package-name]",
    "version": "1.2.3",
    "displayName": "Package Example",
    "description": "This is an example package",
    "unity": "2019.1",
    "unityRelease": "0b5",
    "documentationUrl": "https://example.com/",
    "changelogUrl": "https://example.com/changelog.html",
    "licensesUrl": "https://example.com/licensing.html",
    "dependencies": {
      "com.[company-name].some-package": "1.0.0",
      "com.[company-name].other-package":

middelware_validator

// body validator
const bodyValidation = (yupValidator) => {

    return (req, res, next) => {

        yupValidator.noUnknown().validate(req.body, {}).then((dataValidate) => {
            
            req.dataValidate = dataValidate
            next()

        })
        .catch((error) => {

            res.status(400).json(error.errors)

        })
        
    }
}


const test = (req ,res ,next) => {
    next()
}

module.exports = {
    bodyValidation,
    test
}

// params validator
const pa

solve address bar in safari of iphone

1. 100svh refers to 100% of the height of the smallest possible viewport.
2. 100lvh refers to 100% of the height of the largest possible viewport.
3. 100dvh refers to 100% of the dynamic viewport height — meaning the value will change as the user scrolls. 

I choose solution 2 or 3

360px以下のデバイス対応

!function(){
  const viewPort = document.querySelector('meta[name="viewport"]');
  function adjustViewport(){
    const value = window.outerWidth > 360 ? 'width=devie-width,initial-scale=1' : 'width = 360';
    if(viewport.getAttribute('content') !== value){
      viewport.setAttribute('content',value);
    }
  }
  addEventListener('resize',adjustViewport,false);
  adjustViewport();
}();

Shopify get variant for value

{%- assign variant_for_value = product.variants | where: name, value | first -%}

huh

OK so I am working on factory method module in educative's [golang mastery course](https://www.educative.io/path/5551895077191680/5053452134907904). My question is, what difference does the `()` make in the statement? Also, why did `*&y.thingOne` work without the the parens? ```bash invalid operation: cannot indirect y.thingOne (variable of type string) invalid operation: cannot indirect y.thingTwo (variable of type int) ```
package main

import "fmt"

type Bar struct {
	thingOne string
	thingTwo int
}

func main() {
	y := new(Bar)
	(*y).thingOne = "hello"
	(*y).thingTwo = 1
	fmt.Println(y.thingOne)
	fmt.Println(y.thingTwo)
}

Spinners in Bash

#!/bin/bash

spinner() {
  ($1) & BACK_PID=$!
  # map=(": " ". " ".." " ." " :" " ˙" "˙˙" "˙ ");
  # map=(◔ ◗ ◕ ●);
  # map=(◷ ◶ ◵ ◴);
  # map=(◷ ◶ ◵ ◴);
  map=(🕐 🕑 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 🕛);
  # map=(😮 😀 😁 😐 😑 😬); # https://medium.com/hackernoon/how-i-made-a-talking-emoji-using-regular-emojis-and-javascript-fe20e62ba10
  # map=("|" "/" "-" "\\");
  # map=(◴ ◷ ◶ ◵);
  # map=(◐ ◓ ◑ ◒);
  # map=(◰ ◳ ◲ ◱);
  # map=(╫ ╪);
  # map=(⎺ ⎻ ⎼ ⎽ ⎼ ⎻);
  # map=(▁ ▃ ▅ ▆ ▇ █ ▇ ▆ ▅ ▃);
  # map=(▉ ▊ ▋ ▌ ▍ ▎ ▏ ▎ ▍ ▌ 

Adding Pattern as the default block

<?php
function register_default_posttype_patterns() {
   // set default page layouts
   $selected_post = get_post_type_object( 'post' );
   $selected_post->template = array(
       array( 'core/pattern', array( // pattern format
           'slug' => 'text-domain/patterns-slug',
       ) ),
       array( 'core/paragraph' ) // block format
   );
}
add_action( 'init', 'register_default_posttype_patterns', 11 );