Skip to content

Instantly share code, notes, and snippets.

View exodus4d's full-sized avatar

Mark Friedrich exodus4d

View GitHub Profile
{
"config" : {
"id" : 22,
"name" : "first",
"icon" : "fa-desktop",
"created" : 1445793306,
"updated" : 1446991519,
"scope" : {
"id" : 1,
"name" : "wh",
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
string(472) "��"Id";"Name";"Security";"MassTotal";"MassIndividual";"MassRegeneration";"MaxStableTime";
"1";"name1";"sec1";"masstot1";"massIndividual1";"massRegeneration1";"11";
"2";"name2";"sec2";"masstot2";"massIndividual2";"massRegeneration2";"22";"
@exodus4d
exodus4d / schema.php
Created December 23, 2015 02:15
MySQL Schema extension for f3-cortex
<?php
/**
* Created by PhpStorm.
* User: Exodus
* Date: 19.12.2015
* Time: 12:47
*
* This is an "on top" extension for "Schema Builder"
* see: https://github.com/ikkez/f3-schema-builder
*
<?php
/**
* Created by PhpStorm.
* User: Exodus
* Date: 23.01.2016
* Time: 17:18
*
* Handles access to EVE-Online "CREST API" and "SSO" auth functions
* - Add your API credentials in "environment.ini"
* - Check "PATHFINDER.API" in "pathfinder.ini" for correct API URLs
@exodus4d
exodus4d / second_map_2016_07_31.json
Created July 31, 2016 23:00
Pathfinder example map export JSON file
{
"config" : {
"id" : 2,
"name" : "second map",
"icon" : "fa-desktop",
"created" : 1469912015,
"updated" : 1469912085,
"scope" : {
"id" : 1,
"name" : "wh",
fastcgi_param PF-ENV-BASE '';
fastcgi_param PF-ENV-URL $scheme://$host;
fastcgi_param PF-ENV-DEBUG 3;
fastcgi_param PF-ENV-CACHE 'redis=localhost:6379';
fastcgi_param PF-ENV-DB_DNS 'mysql:host=localhost;port=3306;dbname=';
fastcgi_param PF-ENV-DB_NAME 'pathfinder';
fastcgi_param PF-ENV-DB_USER 'root';
fastcgi_param PF-ENV-DB_PASS '';
@exodus4d
exodus4d / PHP-FPM-respawn-issue.md
Last active January 6, 2018 16:56
Hallo Stefan L. :)

Ich habe den Fehler für das ständige restarten gefunden!

1. In der /etc/php-fpm.conf steht, dass ein PHP-FPM process neu gestartet wird bei 3 errors innherhalb von 1 Minute:
  • emergency_restart_threshold = 3
  • emergency_restart_interval = 1m

Als "Error" wird alles angesehen was sich in der /var/log/php-fpm/error.log findet mit prefix ERROR oder WARNING, das lässt sich über log_level = error anpassen, so dass nur noch `ERROR´ geloggt werden. Ansonsten werden auch solche standard Einträge als Error gelöscht:

[05-Jan-2018 21:04:17] WARNING: [pool www] server reached pm.max_children setting (28), consider raising it
@exodus4d
exodus4d / index.php
Last active September 9, 2018 13:16
Pathfinder HTTP2 ServerPush
<?php
abstract class Controller {
function beforeroute(\Base $f3, $params): bool {
if( !$f3->get('AJAX') ){
// singleton Resource() handels serverPush for static resources
$resource = Resource::instance();
$resource->setOption('filePath', [
'style' => $f3->get('BASE') . '/public/css/' . Config::getPathfinderData('version'),
'script' => $f3->get('BASE') . '/public/js/' . Config::getPathfinderData('version'),
'font' => $f3->get('BASE') . '/public/fonts',
@exodus4d
exodus4d / winnmp.log
Last active November 5, 2018 19:42
winnmp.log
Terminating 80
Terminating ALL processes..
Terminating 6379
Terminating 9002
Terminating 9003
@exodus4d
exodus4d / processJSON.php
Created February 17, 2019 13:20
reactphp NDJSON client decoder
<?php
// NDJSON Ping/Pong communication:
// 1. Client send ONE JSON object
// 2. Server respond with ONE JSON obect
// 3. Client MIGHT send another JSON object
// 4. Server WOULD respond with OND JSON object
// 5. ....
// Questions:
// [1] I use first() in combination with once(), because a data chunk MIGHT contain multiple NDJSON objects
// 2nd, 3rd object should be ignored... Is this a good practice?