OPENSSH Private KEY
: Begins with-----BEGIN OPENSSH PRIVATE KEY-----
OPENSSH Public KEY simple format
:ssh-rsa <base64> [comment]
RFC4716
: can be generated byssh-keygen -e -f ~/.ssh/id_rsa -m RFC4716
, Begins with :---- BEGIN SSH2 PUBLIC KEY ----
PKCS8
: PKCS8 public or private key. Use the-m PKCS8
option ofssh-keygen
. Begins with-----BEGIN PUBLIC KEY-----
DER
: Binary formatPEM
: PEM public key. UsePKCS#8
(Public Key Cryptography Standards #8) when it's used inopenssl
commands.
This file contains 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 | |
enum PullStatus { | |
case PENDING; | |
case RESOLVED; | |
} | |
class Future { | |
private $callbacks = []; |
This file contains 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
FROM amazonlinux:2 | |
RUN yum install -y httpd vim | |
RUN amazon-linux-extras enable php8.2 && yum clean metadata | |
RUN yum install -y php-bcmath.x86_64 \ | |
php-cli.x86_64 \ | |
php-dba.x86_64 \ | |
php-dbg.x86_64 \ | |
php-devel.x86_64 \ | |
php-enchant.x86_64 \ |
With the help of recursion clause (https://www.regular-expressions.info/recurse.html),
(\w*|\w*::\w*)\((?:\s*((?<=\()|(?<!\(),)\s*((?R)|\$\w+)\s*)*\)
This expression matches function calls like below:
Registry::initRegistry(registry( $a, $b, abc( $a, $b, $c), $d));
This file contains 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
### https://linuxcommand.org/lc3_adv_tput.php | |
# save the content of the screen | |
tput smcup | |
tput cup 0 0 | |
for ((i=0; i<10; i++)); do | |
# set forground color | |
tput setaf $i |
This file contains 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 | |
/** | |
* User: Tom.Zhu<[email protected]> | |
* Date: 2022/10/7 | |
* Time: 23:34 | |
*/ | |
$base = new EventBase(); | |
$start = microtime(true); |
This file contains 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 | |
/** | |
* User: Tom.Zhu<[email protected]> | |
* Date: 2022/9/28 | |
* Time: 22:13 | |
*/ | |
class FiberFactory | |
{ | |
private static WeakMap $weakMap; |