Skip to content

Instantly share code, notes, and snippets.

View TOTOleHero's full-sized avatar

Thomas Lecarpentier TOTOleHero

View GitHub Profile
@TOTOleHero
TOTOleHero / PostgreSqlPlatform.php
Created November 16, 2022 07:29 — forked from dextervip/PostgreSqlPlatform.php
Symfony Doctrine support for timescaledb
<?php
namespace App\Domain\Doctrine\DBAL\Platforms;
use Doctrine\DBAL\Platforms\PostgreSQL100Platform as PostgreSqlPlatformBase;
class PostgreSqlPlatform extends PostgreSqlPlatformBase
{
@TOTOleHero
TOTOleHero / openssl_commands.md
Created November 14, 2022 14:42 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
docker-compose up --build -d
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build -d
docker-compose -f docker-compose-db.yml up --build -d
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build  --force-recreate -d
docker-compose up -d db
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d alice_dash_app
docker-compose down
docker-compose ps
@TOTOleHero
TOTOleHero / fix-wsl2-dns-resolution
Created April 12, 2022 10:09 — forked from coltenkrauter/fix-wsl2-dns-resolution.md
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@TOTOleHero
TOTOleHero / ezplatform_password_generator.php
Created August 30, 2021 14:55 — forked from glye/ezplatform_password_generator.php
Generate a new random password for an eZ Platform user. You have to run the SQL update statement yourself, with the correct user ID.
<?php
// Generate a new random password for an eZ Platform user. You have to run the SQL update statement yourself, with the correct user ID.
$password = bin2hex(random_bytes(8)); // 16-char hex password
print("New password: $password\n");
$hash = password_hash($password, PASSWORD_DEFAULT); // this is bcrypt, for now
print("New password hash: $hash\n");
print("Update SQL:\nUPDATE ezuser SET password_hash = '$hash', password_hash_type = 7 WHERE contentobject_id = INSERT YOUR ID HERE, ADMIN IS 14;\n");
@TOTOleHero
TOTOleHero / nginx_google_analytics
Last active April 23, 2020 07:25 — forked from srstsavage/nginx_google_analytics
google analytics in nginx
# send logs for all traffic (including non-html) to google analytics
#
# in server block:
# set $google_analytics_id "UA-THECORRECT-ID";
# include /srv/nginx/google_analytics;
#
# in location blocks:
# post_action @ga;
#
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day.
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": "coordinates": [
[
4.839134216308594,
45.750875776475254
],
[
Go to : https://developer.amazon.com/fr/docs/alexa-voice-service/set-up-raspberry-pi.html
Il faut passer en Strecht
But to install you need to install manualy libssl-dev
wget http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl-dev_1.0.1t-1+deb8u10_armhf.deb
wget http://security-cdn.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u10_armhf.deb
sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u10_armhf.deb libssl-dev_1.0.1t-1+deb8u10_armhf.deb
@TOTOleHero
TOTOleHero / docker-cleanup-resources.md
Created December 6, 2018 16:29 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@TOTOleHero
TOTOleHero / monolog.yml
Created March 30, 2018 11:54 — forked from raystorm/monolog.yml
Symfony log to stdout & stderr
stdout:
type: stream
path: "php://stdout"
level: debug
stderr:
type: stream
path: "php://stderr"
level: warning