2023-02-20-00
This commit is contained in:
parent
8b9af894aa
commit
591eb28388
@ -1,30 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -ex;mkdir -p blah;cd blah;python -c "with open('../$0', 'r') as f:
|
set -ex;mkdir -p blah;cd blah;sed '1,/^exit 0$/d'<../"$0"|python -c "import sys
|
||||||
for day in f.read().split('\n\n\n'):
|
for day in sys.stdin.read().split('\n\n\n'):
|
||||||
if day.split('\n')[0] == '#!/bin/sh':
|
if '<!DOCTYPE html>' in day: prefix=day;continue
|
||||||
prefix='\n'.join(day.split('\n')[day.split('\n').index(
|
|
||||||
'exit 0')+1:])+'\n';continue
|
|
||||||
elif day.split('\n')[0][:4] == '<!--': suffix=day;continue
|
elif day.split('\n')[0][:4] == '<!--': suffix=day;continue
|
||||||
with open(day.split('\n')[0]+'.html', 'x') as g:
|
with open(day.split('\n')[0]+'.html', 'x') as g:
|
||||||
g.write(prefix+day+'\n'+suffix)
|
g.write(prefix+day+'\n'+suffix)";for f in *.html
|
||||||
";for f in *.html;do #in glob we trust
|
do #nt worry :)
|
||||||
test -z "$last" || sed -i "s,__NAVIGATION__,$nav<A HREF=\"$f\">\></A></P>," \
|
test -z "$last" || sed -i "s,__NAVIGATION__,$nav<A HREF=\"$f\">\></A></P>," \
|
||||||
"$last";nav="<P>";test -z "$last"||nav="$nav<A HREF=\"$last\">\<</A>"
|
"$last";nav="<P>";test -z "$last"||nav="$nav<A HREF=\"$last\">\<</A>"
|
||||||
nav="$nav<A HREF=\"index.html\">^</A>";last="$f";done
|
nav="$nav<A HREF=\"index.html\">^</A>";last="$f";done
|
||||||
sed -i "s,__NAVIGATION__,$nav</P>," "$last"
|
sed -i "s,__NAVIGATION__,$nav</P>," "$last"
|
||||||
ls *.html \
|
ls *.html|sed 's/\..*//g'|tee feed.xml|sed 's_.*_<A HREF="/blah/&.html">&</A>_'\
|
||||||
| sed 's/\..*//g' \
|
| sort -r |>index.html sed -e "1i\
|
||||||
| tee feed.xml \
|
|
||||||
| sed 's_.*_<A HREF="/blah/&.html">&</A>_' \
|
|
||||||
| sort -r \
|
|
||||||
| sed \
|
|
||||||
-e "1i\
|
|
||||||
<!DOCTYPE html><HTML><HEAD><TITLE>blah</TITLE></HEAD>\
|
<!DOCTYPE html><HTML><HEAD><TITLE>blah</TITLE></HEAD>\
|
||||||
<BODY><PRE><A HREF="..">..</A>" \
|
<BODY><PRE><A HREF="..">..</A>" -e '$a</PRE></BODY></HTML>'
|
||||||
-e '$a</PRE></BODY></HTML>' \
|
|
||||||
>index.html
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s,^..........$,<item>\
|
-e "s,^..........\$,<item>\
|
||||||
<title>&</title>\
|
<title>&</title>\
|
||||||
<link>https://trinity.moe/blah/&.html</link>\
|
<link>https://trinity.moe/blah/&.html</link>\
|
||||||
<description>blah post for &</description>\
|
<description>blah post for &</description>\
|
||||||
@ -54,6 +45,53 @@ __NAVIGATION__
|
|||||||
</PRE></BODY></HTML>
|
</PRE></BODY></HTML>
|
||||||
|
|
||||||
|
|
||||||
|
2023-02-19
|
||||||
|
|
||||||
|
deep in the shadow the cage in my chest
|
||||||
|
catacombic prison meant for love to
|
||||||
|
rest empty it's empty i'm so alone
|
||||||
|
just leave me a message after the tone
|
||||||
|
misery beats me and minces my bones
|
||||||
|
nobody gets it except for eno
|
||||||
|
my last tok left ticking a lonesome beat
|
||||||
|
keeps all the lights on for what's left of me
|
||||||
|
take this katana and gouge out my guts
|
||||||
|
and let my entrails accumulate dust
|
||||||
|
my microsoft organs always were cursed
|
||||||
|
so I'll be the free software. open source
|
||||||
|
|
||||||
|
Simon looked up from the test and out the window. Kamisama sat in the
|
||||||
|
tree outside, looking at Simon. Simon blinked twice. Kamisama started signing
|
||||||
|
the answer to each exam question. A. Simon wrote it. C. And Simon wrote C. And
|
||||||
|
D, A, B, C, B, D, A, and until the final answer A. He walked to the front of
|
||||||
|
the class and put the paper in the teacher's in-box. Then he walked back to his
|
||||||
|
desk, put his head in his folded arms, and fell asleep for the rest of the
|
||||||
|
period.
|
||||||
|
|
||||||
|
Hand crafting ustar files
|
||||||
|
ustar files are archives of directory trees in regular files. They're
|
||||||
|
generally used to copy over whole trees without messing up filesystem metadata
|
||||||
|
(e.g. xfer to Windows, lose your dates and perms, xfer to UNIX, have to chmod
|
||||||
|
chown etc) and historically have been used to back shit up to tape, hence Tape
|
||||||
|
ARchive.
|
||||||
|
A ustar file is a little header and then the content of a file, and
|
||||||
|
then usually some padding unless you won the lottery and also got struck by
|
||||||
|
lightning and your file is perfectly sized.
|
||||||
|
Bytes 0-100 (0x00 to 0x64) are the UNIX file name. This is padded out
|
||||||
|
with nul bytes if it's not filled. If it is filled with the full hundred
|
||||||
|
characters it doesn't need to have any padding or nul terminator (see pax(1p)).
|
||||||
|
for(int n = printf("%s", filename); n++ < 100; putchar('\0'));
|
||||||
|
Bytes 101-108 (0x65 to 0x6b) are the UNIX file mode in octal, written
|
||||||
|
in ASCII and nul-terminated (so seven digits can be expressed).
|
||||||
|
printf("%7o\0", mode);
|
||||||
|
|
||||||
|
printf '%s' "blah/$day.html"
|
||||||
|
dd bs=1 count=80 </dev/zero 2>/dev/null
|
||||||
|
printf '0000644\0'
|
||||||
|
|
||||||
|
Midnight!
|
||||||
|
|
||||||
|
|
||||||
2023-02-18
|
2023-02-18
|
||||||
|
|
||||||
deep in the catacomb cage in my chest
|
deep in the catacomb cage in my chest
|
||||||
@ -131,6 +169,7 @@ memories, I shall go to Hell. Luckily I don't believe in an afterlife. [...]
|
|||||||
00000870 20 6c 69 63 65 6e 73 65 20 69 73 20 74 68 65 20 | license is the |
|
00000870 20 6c 69 63 65 6e 73 65 20 69 73 20 74 68 65 20 | license is the |
|
||||||
00000880 41 47 50 4c 76 33 2e 00 44 65 73 70 69 74 65 20 |AGPLv3..Despite |
|
00000880 41 47 50 4c 76 33 2e 00 44 65 73 70 69 74 65 20 |AGPLv3..Despite |
|
||||||
00000890 77 68 61 74 20 79 6f 75 20 6d 61 79 20 74 68 69 |what you may thi|
|
00000890 77 68 61 74 20 79 6f 75 20 6d 61 79 20 74 68 69 |what you may thi|
|
||||||
|
000008a0 6e 6b 2c 20 49 27 6d 20 6e 6f 74 20 61 20 62 69 |nk, I'm not a bi|
|
||||||
000008b0 67 20 66 61 6e 20 6f 66 20 57 65 62 33 2e 00 55 |g fan of Web3..U|
|
000008b0 67 20 66 61 6e 20 6f 66 20 57 65 62 33 2e 00 55 |g fan of Web3..U|
|
||||||
000008c0 70 20 66 6f 72 20 61 20 74 68 72 65 65 73 6f 6d |p for a threesom|
|
000008c0 70 20 66 6f 72 20 61 20 74 68 72 65 65 73 6f 6d |p for a threesom|
|
||||||
000008d0 65 3f 00 41 6e 79 74 68 69 6e 67 27 73 20 64 69 |e?.Anything's di|
|
000008d0 65 3f 00 41 6e 79 74 68 69 6e 67 27 73 20 64 69 |e?.Anything's di|
|
||||||
@ -148,6 +187,10 @@ memories, I shall go to Hell. Luckily I don't believe in an afterlife. [...]
|
|||||||
00000990 20 69 73 20 47 54 4b 33 21 00 00 00 00 00 00 00 | is GTK3!.......|
|
00000990 20 69 73 20 47 54 4b 33 21 00 00 00 00 00 00 00 | is GTK3!.......|
|
||||||
000009a0
|
000009a0
|
||||||
|
|
||||||
|
Code doesn't need to be maintainable. Code is poetry. Could you add a
|
||||||
|
mail client to anything written by Dickenson? Make your code unmaintainable and
|
||||||
|
nobody will ruin it.
|
||||||
|
|
||||||
|
|
||||||
2023-02-17
|
2023-02-17
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user