常用ffmpeg命令示例

 - **裁剪音频**
```
# 裁剪开头的3小时音频
ffmpeg -i "F:\Video\fav\rain_sound_10h.m4a" -ss 00:00:00 -to 03:00:00 -acodec copy rain_sound_3h.m4a
```
- **更改视频分辨率**
```
# 应用scale过滤器并设置目标分辨率为640x480
ffmpeg -i input.mp4 -vf scale=640:480 output.mp4

# 缩小宽度到640,同时自动调整高度
ffmpeg -i input.mp4 -vf scale=640:-1 output.mp4

# 缩小高度到360,同时自动调整宽度
ffmpeg -i input.mp4 -vf scale=-1:360 output.mp4  
```

- **更改视频封装格式**
```
# 保留音视频编码的情况下从ts格式转成mp4格式
ffmpeg -i input.ts -c copy output.mp4 
```

AWS Quick Scripts

# List all policies with names starting with "Amplify" and delete them
for policy_arn in $(aws iam list-policies --query "Policies[?starts_with(PolicyName, 'Amplify')].Arn" --output text); do
  echo "Deleting policy: $policy_arn"
  aws iam delete-policy --policy-arn "$policy_arn"
done

2463. Minimum Total Distance Traveled

There are some robots and factories on the X-axis. You are given an integer array robot where robot[i] is the position of the ith robot. You are also given a 2D integer array factory where factory[j] = [positionj, limitj] indicates that positionj is the position of the jth factory and that the jth factory can repair at most limitj robots. The positions of each robot are unique. The positions of each factory are also unique. Note that a robot can be in the same position as a factory initially. All the robots are initially broken; they keep moving in one direction. The direction could be the negative or the positive direction of the X-axis. When a robot reaches a factory that did not reach its limit, the factory repairs the robot, and it stops moving. At any moment, you can set the initial direction of moving for some robot. Your target is to minimize the total distance traveled by all the robots. Return the minimum total distance traveled by all the robots. The test cases are generated such that all the robots can be repaired. Note that All robots move at the same speed. If two robots move in the same direction, they will never collide. If two robots move in opposite directions and they meet at some point, they do not collide. They cross each other. If a robot passes by a factory that reached its limits, it crosses it as if it does not exist. If the robot moved from a position x to a position y, the distance it moved is |y - x|.
/**
 * @param {number[]} robot
 * @param {number[][]} factory
 * @return {number}
 */
var minimumTotalDistance = function(robot, factory) {
    // Sort the robots and factories by their positions
    robot.sort((a, b) => a - b);
    factory.sort((a, b) => a[0] - b[0]);

    const memo = new Map();

    // Helper function to calculate the minimum distance
    function helper(currRobot, currFact, usedCapacity) {
        // Base case: if all robots are processed
        if (currRobot === robot.leng

MySQL admin.md

## Listado Completo de Comandos para Administrar MySQL

### Conexión a MySQL

```bash
mysql -u root -p
```
o
```bash
mysql -h localhost -u root -p
```

### Comandos Básicos

- **Mostrar Bases de Datos**
  ```sql
  SHOW DATABASES;
  ```

- **Crear una Nueva Base de Datos**
  ```sql
  CREATE DATABASE nombre_base_de_datos;
  ```

- **Seleccionar una Base de Datos**
  ```sql
  USE nombre_base_de_datos;
  ```

- **Eliminar una Base de Datos**
  ```sql
  DROP DATABASE nombre_base_de_datos;
  ```

- **

RD - Berlitz / I am The George - Lead

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
          contactFormName: "test",
          contactFormLastname: "test",
          contactFormEmail: "test@iamthegeorge.com",
          contactFormPhone: "666555444",
          event: "leadEnquiryContactForm",
  });
</script>

HELP

## Select
```sql
SELECT * FROM exchanges_coin_tickers_prices ORDER BY ts LIMIT 10 WHERE date = '2024-10-30'
SELECT * FROM exchanges_coin_tickers_prices WHERE date = '2024-10-30'
SELECT * FROM exchanges_coin_tickers_prices WHERE base_symbol IN ('CFG', 'WCFG') AND date = '2024-10-22'
SELECT * FROM exchanges_coin_tickers_prices WHERE id LIKE '%-'
```

## Delete
```sql
DELETE FROM exchanges_coin_tickers_prices WHERE date = '2024-10-30'
DELETE FROM exchanges_coin_tickers_prices WHERE id LIKE '%-18:00

Subject Choice Excel Analysis

import pandas as pd
import os

import tkinter as tk
from tkinter import messagebox

def format_name(name):
    """Format the full name into firstname, surname."""
    name1 = name.rstrip()
    name2 = name1.replace(" ,", "")
    fullname = name2.replace(",", "")
    return fullname.replace(" ", ", ")

root = tk.Tk()
root.withdraw()

# Load the Excel file
file_path = "C:/temp/SubjectChoices2.xlsx"
try:
    df = pd.read_excel(file_path)
except FileNotFoundError:
    print("The

サービスを作るときの各パラメータ

# 概要

サービスを作るときに、そのサービスの利用者が損益分岐点を超えるかはそのサービスの各パラメータが閾値を超えているかどうかで変わると考える。  
その時のパラメータをまとめる。  

# キャラ付けという考え

これらのパラメータの設定は、サービスのキャラクター付けを考えるのに似ている気がする。  
価格を安くして安くて簡単を目指すのか、価格を高くして高いけど質が高い・機能が多いを目指すのか。  
キャラ被りを無くすと差別化が図ったり、キャラ立ちを目指すことで目立ちやすくすることを目指すと考えると考えやすいかも。  

# パラメータ

## 周知率の高さ

そもそも十分に存在が知られていないとサービスの利用者は増えない。  
存在を知っている人の中でその何割かが利用者になると考える。  
存在を知ったうちの何割が利用者になるかはこの後のパラメータによって決定されると考える。  

## 価格の安さ

一定の価格を下回ると売れる場合がある。  

## 価格の高さ

逆に一定の価格を上回ると売れる場合がある。  
価格の高さが

利用ffmpeg对m3u8生成加密切片

> 本文由 [简悦 SimpRead](http://ksria.com/simpread/) 转码, 原文地址 [hlsbook.net](https://hlsbook.net/how-to-encrypt-hls-video-with-ffmpeg/)

> In this post, we’ll look at what encryption HLS supports and how to encrypt your videos with ffmpeg. ......

In this post, we’ll look at what encryption HLS supports and how to encrypt your videos with ffmpeg.

Encryption is the process of encoding information in such a way that only authorised parties can read it. The encryption process requires some kind of

随机生成一个AES密钥

AES密钥是一个长度为128位、192位或256位的二进制串。要随机生成一个AES密钥,可以使用随机数生成器来生成一个长度合适的随机二进制串。在 Python 中可以使用以下代码来生成一个随机的 AES 128 位密钥:

```py
import os
key = os.urandom(16)
print(key)
```

1671. Minimum Number of Removals to Make Mountain Array

You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 < i < arr.length - 1 such that: arr[0] < arr[1] < ... < arr[i - 1] < arr[i] arr[i] > arr[i + 1] > ... > arr[arr.length - 1] Given an integer array nums​​​, return the minimum number of elements to remove to make nums​​​ a mountain array.
/**
 * @param {number[]} nums
 * @return {number}
 */
var minimumMountainRemovals = function(nums) {
    const n = nums.length;
    if (n < 3) return 0;

    // Arrays to store the length of the longest increasing subsequence (LIS) ending at each index
    const inc = new Array(n).fill(1);
    // Arrays to store the length of the longest decreasing subsequence (LDS) starting at each index
    const dec = new Array(n).fill(1);

    // Calculate the LIS ending at each index
    for (let i = 1; i <

preload webfonts

 <!-- Preload webfonts -->
    <link rel="preload" href="/templates/yootheme_custom/webfonts/Comfortaa-Regular.woff2" as="font" type="font/woff2" crossorigin="anonymous">
    <link rel="preload" href="/templates/yootheme_custom/webfonts/Comfortaa-Regular.woff" as="font" type="font/woff" crossorigin="anonymous">
    <link rel="preload" href="/templates/yootheme_custom/webfonts/AveriaSerifLibre-Bold.woff2" as="font" type="font/woff2" crossorigin="anonymous">
    <link rel="preload" href="/template

Create New Playwright Server

1. clone git repo (how to add new ssh key?)
//2. install nodejs:
//sudo apt update
//sudo apt install nodejs
//3. Install npm
//sudo apt install npm
4. Update nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
optional -> list available versions:
nvm list-remote
5. Install node
nvm install v22.2.0
6. Configure config.json
7. npm install
8. npx playwright install
9. npx playwright install-deps

Installing Web Audio Analyzer/Gener

Useful routes on Linux

- [Official Guide](https://www.intel.com/content/www/us/en/develop/documentation/installation-guide-for-intel-oneapi-toolkits-linux/top/installation/install-using-package-managers/apt.html)
- [VMagnin's post](https://fortran-lang.discourse.group/t/intel-releases-oneapi-toolkit-free-fortran-2018/471/43)
- **NOTE**: Make sure to do `sudo apt update` after adding intel's repositories to apt.
- [VMagnin's post regarding sourcing `/opt/intel/oneapi/setvars.sh`](https://fortran-lang.discourse.group/t/

body class label (top left)

/** * Dit script voegt een detector toe aan de pagina die de huidige body class weergeeft. * De body class kan een van de volgende waarden zijn: 's', 'm', 'l', 'xl', 'xxl'. * De detector wordt linksboven op de pagina weergegeven en wordt bijgewerkt wanneer de body class verandert. * * Functionaliteiten: * 1. Verwijdert een bestaande detector als die er al is. * 2. Maakt een nieuwe detector en voegt deze toe aan de pagina. * 3. Detecteert de huidige body class en werkt de detector bij. * 4. Observeert wijzigingen aan de body class en werkt de detector bij wanneer de class verandert. */
/**
 * Dit script voegt een detector toe aan de pagina die de huidige body class weergeeft.
 * De body class kan een van de volgende waarden zijn: 's', 'm', 'l', 'xl', 'xxl'.
 * De detector wordt linksboven op de pagina weergegeven en wordt bijgewerkt wanneer de body class verandert.
 * 
 * Functionaliteiten:
 * 1. Verwijdert een bestaande detector als die er al is.
 * 2. Maakt een nieuwe detector en voegt deze toe aan de pagina.
 * 3. Detecteert de huidige body class en werkt de detecto