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 | |
function markdownFiles(string $directory) : \Generator | |
{ | |
$recurDirIter = new RecursiveDirectoryIterator("./posts/"); | |
$recurIterIter = new RecursiveIteratorIterator($recurDirIter); | |
$regexIter = new RegexIterator($recurIterIter, '/^.+\.md$/', \RecursiveRegexIterator::GET_MATCH); | |
foreach ($regexIter as $filePath) { | |
yield $filePath[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
version: "3.4" | |
services: | |
ubuntu: | |
image: ubuntu:18.04 | |
container_name: ubuntu | |
command: | |
- sleep | |
- infinity | |
volumes: | |
- /run/user/1000:/run/user/1000 |
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
server { | |
listen 80; | |
server_name localhost; | |
root /home/bookworm/Sites; | |
index index.php index.html index.htm; | |
try_files $uri $uri/ /index.php; | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9001; |
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 DateTimeExtra extends DateTime { | |
public function weekofmonth() { | |
$thursday = $this->thursday(); | |
if ( $thursday->format('n') != $this->format('n') ) { | |
$date = $thursday; | |
} | |
else { |
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
$_="5 | |
5 | |
41 | |
33 | |
25 | |
0070 | |
25 | |
33 | |
41 | |
5 |
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 | |
$digitTable = array( | |
0 => array('0', '○', 'О'), | |
1 => array('① ', '⑴ ', '1'), | |
2 => array('② ', '⑵ ', '2'), | |
3 => array('③ ', '⑶ ', '3'), | |
4 => array('④ ', '⑷ ', '4'), | |
5 => array('⑤ ', '⑸ ', '5'), | |
6 => array('⑥ ', '⑹ ', '6'), |
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 Channel implements Splsubject | |
{ | |
private $members; | |
private $name; | |
private $teller; | |
private $message; | |
public function __construct($name) |
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
map $http_host $rootpath { | |
~^(?<domain>.+)\.dev$ $domain; | |
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
#!/bin/sh | |
for i in $( find . -iregex ".*\.\(php\|c\|cc\|h\|cpp\)$" ); do | |
if [ -f $i ]; then | |
iconv -c -f UHC -t utf-8 -o $i.tmp $i | |
mv -f $i $i.bak | |
mv -f $i.tmp $i | |
echo $i | |
fi | |
done |
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
#nop | |
#nop Auto Walk commands | |
#nop | |
#alias {vpath} {#alias {2*}} | |
#nop | |
#nop From midgard | |
#alias {2ring} {#2 s;#6 w;s;e;n;n;w;w;#5 n;e;l ring} | |
#alias {2build} {s;s;#2 e;#2 s} | |
#alias {2shire} {2edge;w;s;e;#2 n} | |
#alias {2west} {2edge;#3 n;#3 e;#2 n;e;#7 n} |