Skip to content

Instantly share code, notes, and snippets.

View ArrayIterator's full-sized avatar

ArrayIterator ArrayIterator

View GitHub Profile
@ArrayIterator
ArrayIterator / DesktopUserAgent.php
Last active February 12, 2020 17:54
PHP Response Generator , Simple Token Generator & User-Agent Helper
<?php
declare(strict_types=1);
namespace ArrayIterator\Library\Source\Generator;
use InvalidArgumentException;
use RangeException;
use TypeError;
/**
@ArrayIterator
ArrayIterator / SchemaParser.php
Last active April 6, 2018 14:01
TL Schema Parser
<?php
declare(strict_types=1);
namespace ArrayIterator\MTProto;
/**
* Class SchemaParser
* @package ArrayIterator\MTProto
* @link https://core.telegram.org/mtproto/TL
*/
@ammgws
ammgws / proxmox_CT_distupgrade_fix.md
Last active October 23, 2024 00:17
Fix for Proxmox container failing to start after dist-upgrade
  • Upgraded from Ubuntu 16.04 LTS to 18.04 (pre-release) using dist-upgade
  • Upon restart CT would not start
  • Error displayed in Web GUI: command 'systemctl start pve-container@101' failed: exit code 1
  • SSHd in and manually ran CT with pct start 101:
>root@server:~# pct start 101
Job for [email protected] failed because the control process exited with error code.
See "systemctl status [email protected]" and "journalctl -xe" for details.
command 'systemctl start pve-container@101' failed: exit code 1
@pentagonal
pentagonal / XmlBuilderTrait.php
Last active November 20, 2022 09:21
Nested XML Builder With Definition
<?php
/*
* XML EXAMPLE FOR RETURNING GET REAL DATA VALUE
* This for Tricky XML Return Data
* if got invalid attribute will be use tag as
* <tag key="key name of tag" type="type value"></tag>
*
// SET DATA
[
'Array1' => [ # array
@denji
denji / nginx-tuning.md
Last active April 21, 2025 11:07
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.