sokil@hp:/media/sokil/GAMMA$ sudo blkid
/dev/sda1: UUID="f3f5adb7-6dd5-4fd8-8ac8-e437190aacf8" TYPE="ext4" PARTUUID="b579a75a-01"
/dev/sda2: LABEL="DATA" UUID="e7083bc0-8a54-4757-a88f-44bef551cf6f" TYPE="ext4" PARTUUID="b579a75a-02"
/dev/sdb1: LABEL="ALPHA" UUID="94895615-2b49-40a1-a582-425666956a00" TYPE="ext4" PARTUUID="00064a47-01"
/dev/sdb2: LABEL="BETA" UUID="F35B-0EBD" TYPE="vfat" PARTUUID="00064a47-02"
/dev/sdb3: LABEL="GAMMA" UUID="17239C486BA96B6B" TYPE="ntfs" PTTYPE="dos" PARTUUID="00064a47-03"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Connection 1 | |
| 1. begin | |
| 3. delete from table where id = 1; | |
| 5. insert into table values (1); | |
| ## Connection 2 | |
| 2. begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # generate cert from another host with validation by dns TXT record | |
| certbot certonly --manual --preferred-challenges dns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class A implements \Countable | |
| { | |
| public function count() { return count($this); } | |
| } | |
| $a = new A(); | |
| echo count($a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| Allowed chars: | |
| 8 - backspace | |
| 9 - tab | |
| 35 - end | |
| 36 - home | |
| 37 - left arruw | |
| 39 - right arrov | |
| 46 - del | |
| 48 - 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export PS1='[\[\e[1;33m\]\u@\h\[\e[0m\] \[\e[1;32m\]\W\[\e[0m\]]\$ ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $source = []; | |
| for ($i = 0; $i < 1000000; $i++) { | |
| $source[] = (bool)mt_rand(0,1); | |
| } | |
| ###### native | |
| $t = microtime(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| namespace HttpClient; | |
| use Psr\Http\Client\ClientInterface; | |
| use Psr\Http\Message\RequestInterface; | |
| use Psr\Http\Message\ResponseFactoryInterface; | |
| use Psr\Http\Message\ResponseInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $array = [ | |
| 'aaaa' => [ | |
| 'k1' => str_repeat('a', 1000), | |
| ] | |
| ]; | |
| switch ($argv[1] ?? 1) { | |
| default: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # delete queue | |
| rabbitmqadmin -c ~/rabbitmq.conf delete queue name=some_queue_name | |
| # delete queue | |
| rabbitmqadmin -c ~/rabbitmq.conf purge queue name=some_queue_name | |
| # show queues | |
| rabbitmqadmin -c ~/rabbitmq.conf list queues name messages messages_ready messages_unacknowledged --sort=messages -N some_group |