python-dotenv Package

[`python-dotenv`](https://pypi.org/project/python-dotenv/) is a Python Package that reads key-value pairs from a `.env` file and set them as environment variables.
# pip install python-dotenv

from dotenv import load_dotenv
import os

load_dotenv()

print(os.getenv('PASSWORD'))

vitest基本

// vitest モジュールから describe、it、expect 関数をインポート
import { describe, it, expect } from "vitest";
// describe 関数は、テストをグループ化するための関数
describe("四則演算", () => {
  // jestでいうtest関数はvu
  it("足し算が成功するか", () => {
    expect(1 + 2).toBe(3);
  });
});

curl-test-container in kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: curl-debugging-deployment
  labels:
    app: curl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: curl
  template:
    metadata:
      labels:
        app: curl
    spec:
      containers:
        - name: curl
          image: curlimages/curl
          args: ['-L', '-v', '-H', 'Content-Type: application/json', 'http://<yourService>/v1/status/']

Settings ScriptableObject

using FA;
using UnityEditor;
using UnityEngine;

[CreateAssetMenu(fileName = "SettingsSO", menuName = "ScriptableObjects/Settings")]
public class Settings : ScriptableObject
{
    public float timeout = 120f;

    public Settings()
    {
        timeout = 120f;
    }
}


#if UNITY_EDITOR
[CustomEditor(typeof(Settings))]
public class SettingsEditor : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        Settings settings = (Setti

Documentación en QUID (Aplicar filtros a imágenes)

**ACCESO**

qEspacios > pruebas > Pruebas API > ejemplo_procesaImagen > principal


![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/o1EOIRAtQEgES1-x86Y2fwk7Zq15bIMa/mapgifm9q.png)

![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/iY6PzmsD4X2G7sdVBdPejxG3q9jY-fBI/nq9de0gn9.png)


**ENLACE**

http://joseantonio.quid.es/ejemplo_procesaImagen

**RESULTADO VISUAL**


![](https://cdn.cacher.io/attachments/u/3kvwv6ftik65m/mNngt3gH2wTk8QbwCChRkfw-MkBFrBxB/q5vvjl3f6.png)

test

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="./css/common.css">
</head>
<body>
  <div class="inner830">


  <section class="p-top-comparison">
    <div class="c-inner1100">
      <table>
        <tr>
          <th scope="col"></th>
          <th scope="col"><img src="./img/common/logo_comparison.png" alt="fastnail" 

HTMX conditional polling

There is no better way yet on how to do this, but we can use server side conditional to load the HTMX code for polling
<!-- htmx auto refresh content if catchup is not ready yet -->
{% if not project.is_catchup_ready %}

<div 
    hx-get="/api/v2/refresh_action_list?action_type={{action_type}}&{{ request.GET.urlencode }}"
    hx-trigger="every 20s"
    hx-target="#action_list_content"
    hx-swap="outerHTML"
>
</div>

{% endif %}
<!-- end htmx auto refresh -->

投稿から本文のみ書き出し

<?php
// 投稿のコンテンツを取得
$content = get_post_field('post_content', get_the_ID());
preg_match_all('/<p[^>]*>(.*?)<\/p>/is', $content, $matches);
$text =  implode("\n", $matches[1]);

Wordpress - touch/mouse hover on page load

Dirty fix used to trigger animation which was waiting for interaction
<?php if(is_front_page()) : ?>
<script>
    window.addEventListener('load', function() {
        var centerX = window.innerWidth / 2;
        var centerY = window.innerHeight / 2;
        
        var event = new MouseEvent('mousemove', {
            bubbles: true,
            cancelable: true,
            view: window,
            clientX: centerX,
            clientY: centerY
        });
        
        document.dispatchEvent(event);
    });
</script>
<?php endif; ?>

Django pagination with tailwind

{% load custom_filters %}

<!-- new pagination -->

<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6 mb-10">
    <div class="flex flex-1 justify-between sm:hidden">
      <a href="#" class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50">Previous</a>
      <a href="#" class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px

Run and Install programs on android emulator

# Con 'emulator':
emulator -avd <nombre_avd>        # Inicia un emulador de Android con un AVD específico.
emulator -list-avds               # Lista todos los AVDs disponibles.

# Con 'adb':
adb devices                       # Lista todos los dispositivos Android conectados, incluidos los emuladores.
adb install <nombre_archivo.apk>  # Instala un archivo APK en el dispositivo o emulador.
adb shell                         # Abre una shell interactiva en el dispositivo o emulador.
adb shell pm lis

histogram best practice

# histogram best practice

## 简介

https://prometheus.io/docs/practices/histograms/

https://zhuanlan.zhihu.com/p/663702683

## 热力图

https://www.xhyonline.com/?p=1594

Get next business day

function getNextBusinessDay(date) {
    do {
        date.setDate(date.getDate() + 1);
    } while (date.getDay() === 0 || date.getDay() === 6);

    return date;
}

mariaclara

mariaclara
inicio{
"host":"CBBEB6B284FE6DDC7ED0A6EB56DC",
"porta":"3F3524"
}fim

Regex For Remove All Search

^.*[keyword].* as part of find all/replace all

Playwright

//npx playwright codegen -> Opens browser and playwright inspector window

const { test, expect } = require("@playwright/test");

test("My Test", async ({ page }) => {
  await page.goto("https://google.com");
  await page.locator('[data-test="username"]').click();
  await page.locator('[data-test="username"]').fill("username");
  await expect(page).toHaveTitle("Google");
  await page.click("id=user-name");
  await page.locator("id=user-name").fill("Edison");
  await page.locator('[id="user-name"