css: remove mirian libre; nanopi_freebsd; collections

This commit is contained in:
dongdigua 2024-05-19 12:22:50 +08:00
parent 303de342f1
commit 09fd66e745
5 changed files with 70 additions and 69 deletions

View File

@ -2,13 +2,6 @@
https://github.com/rgb-24bit/org-html-theme-list org-joshua
*/
@font-face { /* FROM isopenbsdsecu.re */
font-family: miriam libre;
font-display: auto;
src: url(https://cdn.jsdelivr.net/npm/@fontsource/miriam-libre/files/miriam-libre-all-400-normal.woff) format('woff');
font-style: normal;
}
@font-face { /* FROM https://jabberwocky.ca */
font-family: Recursive;
src: url(https://fonts.gstatic.com/s/recursive/v38/8vJN7wMr0mhh-RQChyHEH06TlXhq_gukbYrFMk1QuAIcyEwG_X-dpEfaE5YaERmK-CImKsvxvU-MXGX2fSqasNfUvz2xbXfn1uEQadCCk317tQ0.woff2)
@ -17,7 +10,7 @@ https://github.com/rgb-24bit/org-html-theme-list org-joshua
@media all
{
body {
font-family: "Recursive", "Source Serif", "Helvetica Neue", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif !important;
font-family: "Recursive", "Source Serif", Arial, sans-serif !important;
font-size: 18px;
/* line-height: 21px; */
/* FROM https://github.com/ZenLian/ZenLian.github.io/blob/zola/themes/cattery/static/css/style.css */
@ -30,7 +23,7 @@ https://github.com/rgb-24bit/org-html-theme-list org-joshua
}
body .title {
margin-left: 0;
font-family: Miriam Libre,serif;
font-family: Recursive,serif;
}
#org-div-home-and-up {
@ -205,7 +198,7 @@ https://github.com/rgb-24bit/org-html-theme-list org-joshua
}
pre {
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-family: monospace;
/* color: black; */
background-color: #dce0e8; /* FROM cattery */
/* background-color: #d7dfed; /\* FROM Bryan Ford *\/ */

View File

@ -46,7 +46,8 @@ var data = [
"还是PVP大佬",
"橙白橙绿白蓝蓝白绿棕白棕",
"<a id=quote href=https://www.huorong.cn/info/17082473711122.html>您可能是正版软件的受害者</a>",
"你可以逃避现实,但你无法逃避\"逃避现实\"的后果。"
"你可以逃避现实,但你无法逃避\"逃避现实\"的后果。",
" I'm async, I like the video before it is finished loading."
];
var index = Math.floor((Math.random() * data.length));

View File

@ -47,6 +47,8 @@ You can always find something magical on the Internet.
*** [[https://www.cnblogs.com/caoweixiong/p/12213993.html][Nginx——proxy_pass url 反向代理]]
*** [[https://www.cnblogs.com/fly-fish/archive/2011/08/16/2140695.html][如何看懂man page]]
*** [[https://manas.tech/blog/2023/10/25/approaching-unconventional-problems][How to find a lost phone in a no-cell-coverage camping site]]
*** [[https://predr.ag/blog/wifi-only-works-when-its-raining/][The Wi-Fi only works when it's raining]]
*** [[https://msfjarvis.dev/posts/a-tour-of-my-screenshots-folder][A tour of my screenshots folder]] :minecraft:
** [[http://www.paulgraham.com/todo.html][Paul Graham]]
** [[http://www.qiusir.com/][qiusir]] :rssub:
@ -305,6 +307,10 @@ author of darkman
** [[https://soha.moe][海上的宫殿]]
** [[https://breq.dev][breq.dev]]
*** [[https://breq.dev/projects/eightyeightthirtyone][eightyeightthirty.one - A snapshot of the social graph of 88x31 badges]]
** [[https://blog.outv.im][Re:Linked]]
** [[https://ibcl.us][I BCL]] :sdr:
*** [[https://ibcl.us/archive/RTLSDR-Modifying_20190323.html][Re从零开始的 RTL-SDR 折腾记]]
** [[https://evilpan.com][有价值炮灰]]
# LABLE
@ -354,12 +360,6 @@ EvanMeek / B站: 美味的樱桃菌
#+END_QUOTE
*** [[https://linux.cn/article-14388-1.html][linuxcn: 少年黑客对自由软件的自由漫谈]]
linuxcn 里唯一一个让我感觉很有必要把链接放在这的文章
*** [[https://zhuanlan.zhihu.com/p/580368831][Z-library 域名被扣押,应急访问办法]]
#+BEGIN_SRC text
use the power of tor:
http://zlibrary24tuxziyiyfr7zd46ytefdqbqd2axkmxm4o5374ptpc52fad.onion
http://loginzlib2vrak5zzpcocc3ouizykn6k5qecgj2tzlnab5wcbqhembyd.onion
#+END_SRC
*** [[https://www.zhihu.com/question/306745383][ubuntu重启变成了debian怎么办?]]
U boom tu
*** [[https://www.zhihu.com/question/20034686][计算机领域有哪些经典的典故或笑话?]]
@ -411,6 +411,7 @@ inspiration: Veritasium
**** [[https://youtu.be/b-q4QBy52AA][Web in Native Assembly (Linux x86_64)]]
**** TODO [[https://youtu.be/n-S9DBwPGTo][Hash Table in C]]
1:09 competitive programming
**** TODO [[https://youtu.be/3jxCDCiozAU][Parsing Lisp with Rust (Tula Ep.03)]]
*** [[https://youtu.be/0rJ94rbdteE][Rust 让你感觉像个天才]]
*** [[https://youtu.be/nfF91Z6fqGk][CMD 登录B站]]
*** [[https://youtu.be/crnEygp4C6g][Jeff Geerling: FINALLY! A GPU works on the Raspberry Pi!]]
@ -472,6 +473,7 @@ handle writing through this interplanetary loop.
*** [[https://youtu.be/tZ5FBBnHfm4][Intro to Competitive Programming]]
*** [[https://youtu.be/msdymgkhePo][This Website has No Code, or Does it?]]
*** [[https://youtu.be/7taNCDMpPvc][I Read The Entire Bash Reference Manual (8.5h)]]
*** [[https://youtu.be/WuRPOPocEXY][怎样用 Emacs 做所有事]]
** [[https://www.youtube.com/@Computerphile][<C>]]
*** [[https://youtu.be/BAo5C2qbLq8][Network Time Protocol (NTP)]]
@ -509,6 +511,7 @@ even caught by police when he was a child
*** [[https://youtu.be/GEbn3nHyKnA][How One Line of Code Almost Blew Up the Internet]]
*** [[https://youtu.be/aNEqC-U5tHM][Malware Development (1/2)]]
*** [[https://youtu.be/wTl4vEednkQ][stacksmashing: Breaking Bitlocker - Bypassing the Windows Disk Encryption]]
*** TODO [[https://youtu.be/L8XOqrKBM5w][Custom Cyberdeck For (Legal) Satellite Hacking]]
** Math
*** [[https://youtu.be/KufsL2VgELo][Group Theory]]
@ -565,7 +568,7 @@ When I was trying to download this video, I found that youtube-dl was broken!
*** [[https://youtu.be/x_QmvZRS85U][How To Reply To Negative Comments (90s Tutorial)]]
*** [[https://youtu.be/-b-BQZi7MvI][Silicon carbide / SiC used to emit photons (homemade LED)]]
*** [[https://youtu.be/vuvckBQ1bME][How To Make A CPU]]
*** TODO [[https://youtu.be/oNXzMBA9VU4][Windows XP Installation Music]]
*** [[https://youtu.be/k1BneeJTDcU][Welcome to the Internet - Bo Burnham (from "Inside" -- ALBUM OUT NOW)]]
* r
:PROPERTIES:

View File

@ -14,4 +14,4 @@ TL;DR [[https://github.com/Yesterday17/KokoaLinux][KokoaLinux]]
[[https://github.com/Yesterday17/KokoaLinux][KokoaLinux]] 是一个 Forge mod就扔进 mods 文件夹里就行。
还有一个小问题,我的 sway 是用的 =sway-git= ,因为上述的输入法 PR 还没有进入 release但是现在 [[https://aur.archlinux.org/packages/sway-git#comment-952005][xwayland 的 OpenGL 加速坏了]]……
看我博客的未来人应该能等到这些修复合入稳定版,那时应该问题不大。
看我博客的未来人应该能等到这些修复合入稳定版 (v1.10?),那时应该问题不大。

View File

@ -1,5 +1,6 @@
#+TITLE: 在 NanoPi R2S 上运行 FreeBSD
#+DATE: <2023-07-10 一>
#+STARTUP: overview
曾经有两个树莓派, Pi3 因为碰水, Zero 因为腐蚀, 都报废了
@ -32,21 +33,19 @@ doas dd if=root.img of=/dev/sda
* 开始
- 中国用户第一件事先换源: [[https://mirror.bjtu.edu.cn/help/freebsd/][bjtu FreeBSD 镜像]]
- 中国用户第一件事先换源: [[https://mirror.bjtu.edu.cn/help/freebsd/][bjtu FreeBSD 镜像]] 或 [[https://mirrors.ustc.edu.cn/help/freebsd-pkg.html][USTC]]
- 改密码, =/usr/local/etc/sudoers=
不用 doas 因为 persist 选项只在 OpenBSD 上可用
- 主机名, 路由器配置 DHCP 静态 IP, 本机 =/etc/hosts= 加入主机名解析
#+BEGIN_SRC sh
hostname r2s
vi /etc/rc.conf
#+END_SRC
- 改 shell 配置, [[https://github.com/dongdigua/configs/blob/main/.profile.in][基本还是之前那样]]
在 fortune 里看到一个不错的 PS1, 弄个新 PS1 换换口味
#+BEGIN_SRC sh
PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \[\033[01;31m\]\[\033[00m\] '
#+END_SRC
- HZ? 在 Linux 上降低 HZ 是能减少能耗的, 但这里至少温度没降, 先改成 250 吧 =/boot/loader.conf=
在 fortune 里看到一个不错的 PS1, 弄个新 PS1 换换口味
#+BEGIN_SRC sh
PS1='(\[$(tput md)\]\t <\w>\[$(tput me)\]) $(echo $?) \[\033[01;31m\]\[\033[00m\] '
#+END_SRC
- 降 CPU 频率是当然能减少能耗的 =/etc/sysctl.conf=
#+BEGIN_EXAMPLE
dev.cpu.0.freq=408
#+END_EXAMPLE
* 第一个服务: gopher
#+BEGIN_SRC sh
@ -92,17 +91,20 @@ sed -i '' 's/frps/frpc/g' frpc
exec.clean;
exec.start="sh /etc/rc";
exec.stop="sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_console_${name}.log";
exec.clean;
mount.devfs;
#+END_SRC
** in-jail
=/etc/crontab= 取消 save-entropy 和 adjkerntz
=/etc/rc.conf= 进程越少越好, 似乎我不需要 sendmail
=/etc/rc.conf= 进程越少越好, 似乎我不需要 sendmail (14.0 默认 dma 了,可以不用加这三行)
#+BEGIN_SRC conf
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
#+END_SRC
pkg mirror
** rm: Operation not permitted
#+BEGIN_SRC sh
@ -171,19 +173,6 @@ rm index.gmi
git checkout -- index.gmi
#+END_SRC
* samba
弄着个电子垃圾 64G U盘, 想架个 Samba
要安好多软件包, 果断开 jail
=security = share= 在 4.x 版本被移除了, 注意下
samba 分为 smbd, nmbd, winbindd.
我只用 smbd, 但是跑起来发现光是 smbd 就占用了 1G 的 25%, 15%, 15%, 太耗资源了.
所以这使我必须得用 port 精简功能了.
然后解压 ports tree 的时候死机了, 拔电然后文件系统坏了...
还是 NFS 吧, Need For Speed, 反正我又不用 Windows.
至于权限, -mapall=freebsd 就行
* LED
:PROPERTIES:
:CUSTOM_ID: led
@ -220,7 +209,8 @@ load_rc_config $name
run_rc_command "$1"
#+END_SRC
* obhttpd?
* Web Server
** obhttpd?
httpd 其实算是一个比较年轻的软件, [[https://www.openbsd.org/papers/httpd-asiabsdcon2015.pdf][这里]]有关于为什么 OpenBSD 要自己做一个 Web Server 的历史
重载配置:
#+BEGIN_SRC sh
@ -232,25 +222,10 @@ sudo pkill -HUP obhttpd
*nginx, 启动!*
* [[https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_FreeBSD][MediaWiki]]?
don't
如果你不想被嵌入式设备糟糕的性能浪费一上午的时间最后得到加载时间大于10秒的网页, 放弃吧...
有足够性能的服务器还可以编译带 SQLite 支持的 port
我想使用 MediaWiki 主要想尝试 MinecraftWiki [[https://minecraft.fandom.com/wiki/Module:Schematic][Schematic Module]]
* Avahi
两个都要开啊, 要不然会很慢的!
#+BEGIN_EXAMPLE
avahi_daemon_enable="YES"
avahi_dnsconfd_enable="YES"
#+END_EXAMPLE
* nginx
** nginx
由于默认的 nginx autoindex 太难看, 我想用 [[https://github.com/aperezdc/ngx-fancyindex][fancyindex]] 但是默认安装里又没带.
反正得自己编译, 那不如用 ports 编译一个.
其实 apache 的 autoindex 挺好, 还带 icon, 但是 apache 的配置我真的受不了.
之前有一次用 portsnap(8) 解包 ports 结果崩了, 这回用 git, 没事.
默认的 fancyindex 颜色有点丑, 写个 patch 改一下 (能 inline 就不加 CSS)
根本不用看 doc, 直接凭直觉照猫画虎, 先在 =Makefile.extmod= 里面加上
@ -272,7 +247,7 @@ aur.archlinux.org #07b
"background:#fff;"
-"font-family:\"Bitstream Vera Sans\",\"Lucida Grande\","
-"\"Lucida Sans Unicode\",Lucidux,Verdana,Lucida,sans-serif;"
+"font-family:monospace;"
+"font-family:monospace;"
"}"
"tr:nth-child(even) {"
-"background:#f4f4f4;"
@ -295,8 +270,8 @@ aur.archlinux.org #07b
-"color:#e33;"
+"text-decoration:none;"
+"color:#1793d1;"
+"}"
+"a:hover {"
+"}"
+"a:hover {"
+"color:#39c5bb;"
"}"
"</style>"
@ -304,6 +279,39 @@ aur.archlinux.org #07b
我甚至还可以把 SSL, MAIL, STREAM 的功能通通去掉, 因为我的环境用不到.
** Caddy
不舒服 :(
* [[https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_FreeBSD][MediaWiki]]?
don't
如果你不想被嵌入式设备糟糕的性能浪费一上午的时间最后得到加载时间大于10秒的网页, 放弃吧...
有足够性能的服务器还可以编译带 SQLite 支持的 port
我想使用 MediaWiki 主要想尝试 MinecraftWiki [[https://minecraft.fandom.com/wiki/Module:Schematic][Schematic Module]]
* mDNS
先是 =avahi-app=
两个都要开啊, 要不然会很慢的!
#+BEGIN_EXAMPLE
avahi_daemon_enable="YES"
avahi_dnsconfd_enable="YES"
#+END_EXAMPLE
但是 =avahi-app= 依赖项太多了,很多都是跟图形界面有关的
然后我看到了这个 [[https://forums.freebsd.org/threads/how-to-install-and-configure-mdnsresponder.70713/][How to install and configure mDNSResponder]]
#+BEGIN_EXAMPLE
mdnsresponderposix_enable="YES"
mdnsresponderposix_flags="-n $hostname"
#+END_EXAMPLE
* ports
之前有一次用 portsnap(8) 解包 ports 结果崩了然后文件系统坏了, 这回用 git, 没事.
#+BEGIN_SRC sh
git clone --depth=1 https://git.FreeBSD.org/ports.git /usr/ports
#+END_SRC
** install ports's dependencies with pkg
=USE_PACKAGE_DEPENDS=1=
* ZFS?
之前我只是在唯一的U口上插了一个 32G U盘, 但随着我在服务器上放的东西越来越多并越来越依赖它,
我开始对数据安全担忧: 万一哪天整个U盘坏了呢? 而且这似乎正在发生着, 我已经看到这样的报错了:
@ -317,7 +325,7 @@ aur.archlinux.org #07b
第二天一早醒来, DEGRADED, 一个盘掉了, 查看 dmesg, 又是大量的报错:
#+BEGIN_EXAMPLE
(da1:umass-sim1:1:0:0): Retrying command, 0 more tries remain
(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00
(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 00 00 00 00 00 00 00 00 00
(da1:umass-sim1:1:0:0): CAM status: CCB request completed with an error
(da1:umass-sim1:1:0:0): Error 5, Retries exhausted
(da1:umass-sim1:1:0:0): got CAM status 0x44
@ -393,10 +401,6 @@ make installkernel TARGET_ARCH=aarch64 DESTDIR=/root/aarch64
#+END_SRC
在 vbox 里 900 多秒就编译完了
ROCKCHIP-bbr
#+BEGIN_SRC
#+END_SRC
/etc/src.conf
#+BEGIN_EXAMPLE
KERNCONF=ROCKCHIP-bbr
@ -406,7 +410,6 @@ MALLOC_PRODUCTION=yes
重启时我心里也没底, 但没发生什么意外.
* Ref
- [[https://feng.si/posts/2019/06/freebsd-and-risc-v-the-future-of-open-source-iot-ecosystem/][FreeBSD 与 RISC-V: 开源物联网生态系统的未来]]
- [[https://lists.freebsd.org/archives/freebsd-arm/2021-June/000149.html][freebsd-arm: FriendlyARM NanoPi R2S board support.]]
@ -415,3 +418,4 @@ MALLOC_PRODUCTION=yes
- [[https://docs.freebsd.org/en/articles/rc-scripting/][Practical rc.d scripting in BSD]]
- [[https://szclsya.me/zh-cn/posts/storage/zfs-setup/][ZFS 入门指北:规划与创建存储池]]
- [[https://hostalk.net/posts/tor_bridges_proxy.html][如何优雅地用Tor_下篇]]
- [[https://www.reddit.com/r/freebsd/comments/mrkysj/how_to_install_portss_dependencies_with_pkg/][install ports's dependencies with pkg]]