Skip to content

Instantly share code, notes, and snippets.

@Jan-E
Jan-E / tfr-rebuild-trees.php
Created June 2, 2023 05:32
Rebuild Drupal Subgroup trees. Run without args to analyze, with ?execute=1 to rebuild all tree values
<?php
set_time_limit(600); // 10 minutes
error_reporting(E_ALL ^ E_NOTICE);
ini_set ('display_errors', "Off");
$execute = isset($_REQUEST['execute']) ? 1 : 0;
$only_tree = isset($_REQUEST['tree']) ? intval($_REQUEST['tree']) : NULL;
$execute_all_in_one = isset($_REQUEST['execute_all_in_one']) ? 1 : 0;
header("Pragma: no-cache");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
<?php
$server = 'smtp.example.com';
$port = '587';
set_time_limit(180);
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
ini_set ('display_errors', "On");
header("Pragma: no-cache");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-control: no-cache, no-store, must-revalidate, max_age=0");
@Jan-E
Jan-E / install-gcc-4.9.3-on-centos6.txt
Created November 20, 2018 07:22 — forked from wisdomfusion/install-gcc-4.9.3-on-centos6.txt
Install gcc-4.9.3 on CentOS 6
yum install libmpc-devel mpfr-devel gmp-devel
cd /usr/src/
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2 -O
tar xvfj gcc-4.9.3.tar.bz2
cd gcc-4.9.3
./configure --disable-multilib --enable-languages=c,c++
make -j `grep processor /proc/cpuinfo | wc -l`
make install
@ECHO OFF
set ACPath=
set ALCKPath=
set ALLUSERSPROFILE=
set APACHE2_HOME=
set APPDATA=
set APPVER=
set asl_log=
set asl.log=
set ASM=
Thus went wrong with over 30000 records. 30000 records * 450 fields is way too much:
SELECT `lime_survey_833789`.`id`,
`lime_survey_833789`.`token`,
`lime_survey_833789`.`submitdate`,
`lime_survey_833789`.`lastpage`,
`lime_survey_833789`.`startlanguage`,
`lime_survey_833789`.`startdate`,
`lime_survey_833789`.`datestamp`,
`lime_survey_833789`.`ipaddr`,
C:\>OpenSSL version
OpenSSL 1.0.2-chacha (1.0.2f-fips-dev)
C:\>OpenSSL ciphers -v
ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=ECDSA Enc=ChaCha20(256) Mac=AEAD
ECDHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=RSA Enc=ChaCha20(256) Mac=AEAD
DHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=DH Au=RSA Enc=ChaCha20(256) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA384
#
# GNU Makefile for nghttp2 / MSVC.
#
# By G. Vanem <gvanem@yahoo.no> 2013
# Updated 3/2015 by Remo Eichenberger @remoe
# The MIT License apply.
#
#
# Choose your weapons:
#
# GNU Makefile for nghttp2 / MSVC.
#
# By G. Vanem <gvanem@yahoo.no> 2013
# Updated 3/2015 by Remo Eichenberger @remoe
# The MIT License apply.
#
#
# Choose your weapons:
@Jan-E
Jan-E / pbkdf2.php
Last active May 19, 2021 02:50 — forked from rsky/pbkdf2.php
<?php
/**
* Generate a PBKDF2 key derivation of a supplied password
*
* This is a hash_pbkdf2() implementation for PHP versions 5.3 and 5.4.
* @link http://www.php.net/manual/en/function.hash-pbkdf2.php
*
* @param string $algo
* @param string $password
@Jan-E
Jan-E / ocp.php
Last active August 29, 2015 14:15 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs