Skip to content

Instantly share code, notes, and snippets.

View Blueblazer172's full-sized avatar

Hannes Stefani Blueblazer172

  • Germany, Stuttgart
View GitHub Profile
@Blueblazer172
Blueblazer172 / php-docker-ext
Created July 20, 2023 12:49 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@Blueblazer172
Blueblazer172 / chrome-save-cert.js
Last active September 26, 2022 15:58
Workaround js fix for chrome certificate export: https://stackoverflow.com/a/55528697/5930557
var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(document.getElementsByClassName('debugging-content')[9].innerText));element.setAttribute('download', location.host.replace(/[^\dA-Za-z]/g, '-') + '.crt');document.body.appendChild(element);element.click();document.body.removeChild(element);
@Blueblazer172
Blueblazer172 / proxmox_resize_pve-root
Created February 8, 2022 12:58
Proxmox - Resize pve-root
# Check disk space before
df -h
# Delete local-lvm storage in gui
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
@Blueblazer172
Blueblazer172 / pdo_mysqldatabase_connection.php
Created June 19, 2016 20:54
Connect to mysql-database by PDO
<?php
try {
$db = new PDO("mysql:dbname=gaestebuch;host=localhost",
"root",
"Bananafone+5106");
$sql = "CREATE TABLE gaestebuch (
id INTEGER PRIMARY KEY,
ueberschrift VARCHAR(1000),
eintrag VARCHAR(5000),
autor VARCHAR(50),