Docker Compose YAML

This example **sets up two services**, a web server using Nginx and a MySQL database. * The web service is using the Nginx image, exposing port 8080 on the host and mapping it to port 80 inside the container. It mounts the local html directory to the container's /usr/share/nginx/html directory for serving static content. * The db service is using the MySQL image, sets up some environment variables for configuring the MySQL database, and mounts the local db_data directory to the container's /var/lib/mysql directory for persistent storage. * Both services are connected to a custom network called mynetwork. _You can save this YAML file as docker-compose.yml in your project directory and run docker-compose up to start both services defined in the file. Make sure to adjust configurations as per your project requirements_
version: '3.8'

services:
  web:
    image: nginx:latest
    ports:
      - "8080:80"
    volumes:
      - ./html:/usr/share/nginx/html
    networks:
      - mynetwork

  db:
    image: mysql:latest
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: mydatabase
      MYSQL_USER: myuser
      MYSQL_PASSWORD: mypassword
    volumes:
      - ./db_data:/var/lib/mysql
    networks:
      - mynetwork

networks:
  mynetwork:

denison_brain_gym_resources

https://fitedukacja.com.pl/fitness-dla-mozgu-czyli-jak-pomnazac-potencjal-tworczy-dzieci-i-uczniow-rozwiniecie-cz-1/
https://fitedukacja.com.pl/jaka-historie-moga-opowiedziec-rzeczy-scenariusz-lekcji-z-motywem-

regex

https://www.codingforentrepreneurs.com/blog/python-regular-expressions/

redshift_optimization

https://www.horsepaste.com/age-quiz

Shopify function: hide payment methods based on country

query RunInput {
  cart {
    deliveryGroups {
      deliveryAddress {
        countryCode
      }
    }
  }
  paymentMethods {
    id
    name
  }
}

wget help

GNU Wget 1.21.2, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version                   display the version of Wget and exit
  -h,  --help                      print this help
  -b,  --background                go to background after startup
  -e,  --execute=COMMAND           execute a `.wgetrc'-style command

Logging and input file:
  -q,  --quiet                     quiet (no o

Delete Node

/**
 * Definition for singly-linked list.
 * function ListNode(val) {
 *     this.val = val;
 *     this.next = null;
 * }
 */
/**
 * @param {ListNode} node
 * @return {void} Do not return anything, modify node in-place instead.
 */
var deleteNode = function(node) {
    // Copy the value of the next node to the current node.
    // This effectively "deletes" the current node's value by overwriting it.
    node.val = node.next.val;

    // Delete the next node by skipping over it in the list.
   

Combinators vs. Monad Transformers vs algebraic effects (theoretical)

All in scala 3.3.3 (except algebraic effects, this is theoretical)
LeagueApi.getAllMatches(puuid, oldIds, matchCountRef)
  .metered(3.seconds)
  .evalMap(_.flatTraverse(LeagueDb.insertMatchIfUnique(_).attempt)
    <* matchCountRef.update(_.decrement)
    <* IO.whenA(keys.nonEmpty)(cache.del(keys*).void))
  .compile.drain

Num Rescue Boats

/**
 * @param {number[]} people
 * @param {number} limit
 * @return {number}
 */
var numRescueBoats = function(people, limit) {
    // Sort the people array in ascending order
    people.sort((a, b) => a - b);
    
    // Initialize two pointers, one at the start of the array (i) and one at the end (j)
    let i = 0, j = people.length - 1;
    
    // Initialize the number of boats needed to 0
    let numBoats = 0;
    
    // While the start pointer is less than or equal to the end pointer
    

ubuntu初期設定

- password
```
sudo su -
passwd
exit
exit
# re-login by ssh
```

- update authorized_keys

- apt
```
apt update
apt install -y vim
sudo update-alternatives --set editor /usr/bin/vim.basic
```

- sudoers
echo "$(id -u -n) ALL=NOPASSWD: ALL" >> /etc/sudoers

YouTube download mp4, cut and convert to mp3

#!pip install -q auto-editor pytube moviepy

from pytube import YouTube
import moviepy.editor as mp

LINK = "https://www.youtube.com/watch?v=KohUW8gaNLQ"

yt = YouTube(LINK)
yt = yt.streams.get_highest_resolution()
  
try:
      yt.download()
except:
    print("An error has occurred")
print("Download is completed successfully")

fname = yt.title.replace(":","")
clip = mp.VideoFileClip(fname+".mp4")
clip = clip.subclip(8*60, 14*60-10) 
clip.audio.write_audiofile(fname+".mp3")

YouTube download mp4, cut and convert to mp3

#!pip install -q auto-editor pytube moviepy

from pytube import YouTube
import moviepy.editor as mp

LINK = "https://www.youtube.com/watch?v=KohUW8gaNLQ"

yt = YouTube(LINK)
yt = yt.streams.get_highest_resolution()
  
try:
      yt.download()
except:
    print("An error has occurred")
print("Download is completed successfully")

fname = yt.title.replace(":","")
clip = mp.VideoFileClip(fname+".mp4")
clip = clip.subclip(8*60, 14*60-10) 
clip.audio.write_audiofile(fname+".mp3")

alice_thomaz

https://medium.com/@alice_thomaz

Compare Version

/**
 * @param {string} version1
 * @param {string} version2
 * @return {number}
 */
var compareVersion = function(version1, version2) {
    // Split the version strings by '.' to get the revisions as an array
    var v1 = version1.split('.');
    var v2 = version2.split('.');

    // Get the maximum length between the two versions
    var len = Math.max(v1.length, v2.length);

    // Loop through each revision from left to right
    for (var i = 0; i < len; i++) {
        // Parse the revision t

Contenedor Docker que sirva aplicación Flutter en un servidor web



Crea un archivo Dockerfile en la raíz de tu proyecto Flutter. Este archivo contendrá las instrucciones para construir la imagen Docker de tu aplicación web Flutter.
Escribe las instrucciones en el Dockerfile. Aquí tienes un ejemplo básico de cómo podría ser:
```Dockerfile
# Usa una imagen base ligera, en este caso, nginx
FROM nginx:alpine

# Copia los archivos de la carpeta build/web a la carpeta de nginx para servir los archivos estáticos
COPY build/web /usr/share/nginx/html

# Expone el puer

Sql Server Encrypt

/*
 TDE: TRANSPARENT DATA ENCRYPTION
*/
--https://www.youtube.com/watch?v=l6Bkkq5X6cE&ab_channel=MaxiData
-- CREAMOS LA MASTERKEY A NIVEL SERVIDOR
USE MASTER;
GO
CREATE MASTER KEY ENCRYPTION
BY PASSWORD='6W0sCI8x0h5u&EC2013';
GO
-- CREAMOS EL CERTIFICADO USANDO EL BACKUP
CREATE CERTIFICATE TDE_TRIGGERDBCERT
FROM FILE = '/VAR/OPT/MSSQL/compartir/TRIGGERDB_TDE_CERT'
WITH PRIVATE KEY (FILE = '/VAR/OPT/MSSQL/compartir/TRIGGERDB_TDE_CERTKEY.PVK',
	DECRYPTION BY PASSWORD = 'TRIGGERDB1234