SPX: php profiling

Source : https://github.com/NoiseByNorthwest/php-spx Installation apt-get install zlib1g-dev Replace X by your PHP version : apt install phpX.X-dev git clone https://github.com/NoiseByNorthwest/php-spx.git cd php-spx git checkout release/latest phpize ./configure make make install Configuration create /etc/php/X.X/mod-available/spx.ini extension=spx.so process.dumpable = yes spx.http_enabled=1 spx.http_key="password" spx.http_ip_whitelist="127.0.0.1" Replace password and your ip 127.0.0.1 ln -s /etc/php/X.X/mod-available/spx.ini /etc/php/X.X/fpm/conf.d/20-spx.ini go to http://example.com/?SPX_KEY=password&SPX_UI_URI=/ Enjoy !

<span title='2023-08-09 00:00:00 +0000 UTC'>9 août 2023</span>&nbsp;·&nbsp;1 min

Wireguard : tips

verbose Simple echo: echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control nmcli import nmcli connection import type wireguard file /etc/wireguard/wg0.conf

<span title='2023-05-04 00:00:00 +0000 UTC'>4 mai 2023</span>&nbsp;·&nbsp;1 min

Next : vaultwarden

Prochainement Pour la gestion des mots de passe en équipe ! https://github.com/dani-garcia/vaultwarden docker-compose.yml version: '3.3' services: server: restart: always container_name: vaultwarden environment: WEBSOCKET_ENABLED: "true" # Enable WebSocket notifications. SIGNUPS_ALLOWED=: "true" ADMIN_TOKEN: "super_secret_token_api" DATABASE_URL: "postgresql://vault:StrongPassword@postgres:5432/vaultwarden" ORG_GROUPS_ENABLED: "true" INVITATIONS_ALLOWED: "false" ORG_CREATION_USERS: "test@test.com" DOMAIN: "https://test.com" volumes: - '/home/docker/vaultwarden/data:/data/' ports: - '8000:80' - '3012:3012' image: vaultwarden/server:latest postgres: restart: always image: 'postgres:latest' ports: - '5432:5432' environment: POSTGRES_USER: vault POSTGRES_PASSWORD: StrongPassword POSTGRES_DB: vaultwarden volumes: - '/home/docker/vaultwarden/db/:/var/lib/postgresql/data/' Jusqu’ici tout va bien.

<span title='2022-10-28 00:00:00 +0000 UTC'>28 octobre 2022</span>&nbsp;·&nbsp;1 min

MyISAM to InnoDB

Remplacer your_database par le nom de votre base de données : SELECT CONCAT('ALTER TABLE ',CONCAT(TABLE_SCHEMA,'.',TABLE_NAME),' ENGINE=InnoDB;') FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='MyISAM' AND TABLE_SCHEMA = 'your_database' INTO OUTFILE '/tmp/mysql.conversions'; Vérifier le contenu de /tmp/mysql.conversions et on le joue : SOURCE /tmp/mysql.conversions;

<span title='2022-09-08 00:00:00 +0000 UTC'>8 septembre 2022</span>&nbsp;·&nbsp;1 min

Elasticsearch - readonly index

curl http://localhost:9200/*/_settings \ -X PUT -H 'Content-Type: application/json' \ -d '{ "index.blocks.read_only_allow_delete": null }'

<span title='2022-08-30 00:00:00 +0000 UTC'>30 août 2022</span>&nbsp;·&nbsp;1 min

Prestashop CVE

link https://build.prestashop.com/news/major-security-vulnerability-on-prestashop-websites/ todo Delete from config/smarty.config.inc.php if (Configuration::get('PS_SMARTY_CACHING_TYPE') == 'mysql') { include _PS_CLASS_DIR_.'Smarty/SmartyCacheResourceMysql.php'; $smarty->caching_type = 'mysql'; }

<span title='2022-07-22 00:00:00 +0000 UTC'>22 juillet 2022</span>&nbsp;·&nbsp;1 min

Simple pastebin : Pinnwand

Simple Dockerfile to build pinnwand. https://pinnwand.readthedocs.io/en/latest/index.html FROM alpine RUN apk update && apk add py3-pip gcc python3-dev musl-dev g++ RUN pip3 install pinnwand EXPOSE 9000 CMD pinnwand http --port 9000

<span title='2022-04-07 00:00:00 +0000 UTC'>7 avril 2022</span>&nbsp;·&nbsp;1 min

pip_search

Try this : pip3 install pip_search pip_search podman-compose -s released 🐍 https://pypi.org/search/?q=podman-compose 🐍 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Package ┃ Version ┃ Released ┃ Description ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ 📂 compose-addons │ 0.2.1 │ 20-08-2015 │ Tools to supplement │ │ 📂 compose-deploy │ 0.1.5 │ 13-05-2016 │ A wrapper around docker-compose to aid in deploying to a remote server. │ │ 📂 compose_diff │ 0.4.0 │ 03-01-2017 │ diff docker-compose files │ │ 📂 compose-monitor │ 1.2.6 │ 10-07-2017 │ This utility is designed for monitoring and updating of the services in the specified docker-compose.yml file. │ │ 📂 compose_format │ 1.2.0 │ 12-10-2017 │ format docker-compose files │ │ 📂 compose-dump │ 0.1b4 │ 27-02-2018 │ Backup tool for Docker Compose projects │ │ 📂 compose-paas │ 1.0.3 │ 14-05-2018 │ Deploy to multiple container platforms/PAAS using docker-compose files │ │ 📂 dockerfile-compose │ 0.0.3 │ 16-09-2018 │ Utils for making dockerfiles from other dockerfiles │ │ 📂 flask-compose │ 0.2.0 │ 27-10-2018 │ A routing library for flask applications obeying the "Decorator Design Pattern". │ │ 📂 ansible-compose │ 1.0.8.post5 │ 15-02-2019 │ The obscene docker-compose deploy with ansible cli │ │ 📂 pandoc-compose │ 0.0.7 │ 14-06-2019 │ Create and run a fully configured pandoc command. │ │ 📂 jinja-compose │ 0.0.1 │ 22-07-2019 │ docker-compose wrapper with Jinja support │ │ 📂 compose-watcher │ 1.2.5 │ 19-03-2020 │ compose-watcher │ │ 📂 compose-cms │ 1.0.3 │ 24-07-2020 │ │ │ 📂 context-compose │ 0.0.2 │ 22-10-2020 │ Compose context managers from a sequence │ │ 📂 compose-plantuml │ 0.2.1 │ 23-11-2020 │ converts docker-compose into plantuml │ │ 📂 gen-compose │ 1.1.0 │ 27-11-2020 │ Key generator for macos keybinding system │ │ 📂 opod │ 0.0.1 │ 24-01-2021 │ Use opod orchestrate Podman │ │ 📂 ecs-compose │ 0.9.92 │ 25-01-2021 │ Amazon ECS cli for docker-compose like deployments │ │ 📂 location-guessing-game-telegram-bot │ 0.1.1 │ 14-02-2021 │ Basic Telegram Bot Sending Random Wikimedia Commons Photos │ │ 📂 backup-compose │ 0.0.4 │ 16-03-2021 │ Backup/Restore your docker-compose projects │ │ 📂 neoload-compose │ 0.1.4 │ 02-04-2021 │ A command-line native utility for creating NeoLoad performance tests │ │ 📂 gada-compose │ 0.1a0 │ 07-04-2021 │ Python frontend for mysql cli │ │ 📂 compose-flow │ 3.8.2 │ 06-05-2021 │ codified workflows for docker compose │ │ 📂 docker-compose │ 1.29.2 == │ 10-05-2021 │ Multi-container orchestration for Docker │ │ 📂 compose-mode │ 0.6.0 │ 03-06-2021 │ A tiny wrapper around docker-compose to easily use multiple sets of config files │ │ 📂 guacamole-compose │ 0.1.7 │ 17-06-2021 │ Easy deployment of Apache Guacamole. │ │ 📂 precompose │ 0.4.0 │ 09-08-2021 │ Import a Docker Compose application into ostree │ │ 📂 connexion-compose │ 0.3.2 │ 03-09-2021 │ Create Connexion schema composed from several files in a nested directory structure. │ │ 📂 compose.db2 │ 0.2.0.2 │ 16-10-2021 │ compose db2 management library │ │ 📂 compose │ 1.2.8 │ 19-10-2021 │ The classic ``compose``, with all the Pythonic features. │ │ 📂 podman-compose │ 1.0.3 == │ 21-12-2021 │ A script to run docker-compose.yml using podman │ │ 📂 repo2podman │ 0.1.1 │ 07-02-2022 │ Repo2docker Podman extension │ │ 📂 cloudview │ 0.3.8 │ 09-02-2022 │ View instance information on all supported cloud providers │ │ 📂 podman │ 4.0.0 │ 28-02-2022 │ Bindings for Podman RESTful API │ │ 📂 v-podman-compose │ 1.0.4b1 │ 23-03-2022 │ A script to run docker-compose.yml using podman │ │ 📂 compose-pydantic │ 0.2.0 │ 02-04-2022 │ Parse Compose Specification data using Pydantic │ │ 📂 thoth-messaging │ 0.16.1 │ 05-04-2022 │ Messaging module of Project Thoth │ │ 📂 molecule-podman │ 2.0.0 │ 08-04-2022 │ Molecule aids in the development and testing of Ansible roles │ │ 📂 thoth-storages │ 0.71.2 │ 11-04-2022 │ Storage and database adapters available in project Thoth │ └────────────────────────────────────────┴─────────────┴────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

<span title='2022-04-04 00:00:00 +0000 UTC'>4 avril 2022</span>&nbsp;·&nbsp;4 min

La chaîne iptables DOCKER-USER

Si on démarre un container avec : docker run -p 80:80 nginx, docker rajoute une règle dans sa chaîne DOCKER-USER de iptables afin de faire son foward. De cette manière, les règles de INPUT ne sont pas utilisées et le filtre entrant ne s’applique pas au service des containers. On joue donc avec DOCKER-USER pour contourner ce problème. Par exemple on peut ajouter en dernière ligne à cette chaîne une règle -j DROP -i eth0 et filtrer par la suite. ...

<span title='2022-01-14 00:00:00 +0000 UTC'>14 janvier 2022</span>&nbsp;·&nbsp;1 min

SQL: copie simple d'une table

Pour ne plus oublier : insert into new_table (select * from old_table);

<span title='2021-10-04 00:00:00 +0000 UTC'>4 octobre 2021</span>&nbsp;·&nbsp;1 min