dongdigua's blog Blog! Emacs webfeeder.el https://dongdigua.github.io 五, 18 11月 2022 13:58:08 +0800 记一次帮老师修U盘

发生甚么事了

老师上课放(U盘里)视频的时候 "啪" 把U盘拔了!

下一次插上就提示 "是否格式化" :)

反正闲时间太多, 我就准备试试给修复一下, 使用我在我文具盒里待了两年的工具箱: Ventoy 启动盘

咋整

我首先是对 Linux 文件系统有一定基础, 也进行过不少操作(如多次安装gentoo和arch)

也搞过一些文件系统损坏的事(比如调分区坏过C盘), 还算有经验

于是我上老师电脑启动了两年前放在工具箱盘里的 Fedora Workstation 34

第一次尝试

把老师的U盘插上, "嘎嗒"一声熟悉的 gnome 提示音, U盘没显示

/dev/sdc

mount -t 试试? 是不是没文件系统坏了没识别? 不是

fsck 试试? 不行

嗯??? 似乎有点超出我的知识储备和经验了

第二次尝试

只有一个整盘, 没有分区号? 凭直觉, 我觉得那就是分区表坏了

然后查了一下(当然用英文查), 有没有能修复分区表的? testdisk

然后先用 dd 整盘备份一下, 跑 testdisk

很简单就把分区表恢复出来了!

那就开始拷文件吧…"文件不完整"

第三次尝试

和 testdisk 一家的软件还有 photorec, 我似乎在 linuxcn 见过(懒得去找链接了)

这东西一看就知道是通过文件头来识别并恢复文件的

那就跑呗

一节课之后, 文件(和曾经被删除的)都回来了

开心!

我可以比较廉价的进行数据恢复

联系我后将磁盘镜像传到 FTP 服务器, 不接百度网盘

暂定价如下:

16GiB 以下 0.3 XMR

16~64GiB 0.5 XMR

后续

恢复完之后我想瞅瞅那些教学视频, 正常来讲 f34 应该有解码器的, 但是没有

是不是我连着网给我删了?

]]>
https://dongdigua.github.io/recover_udisk.html https://dongdigua.github.io/recover_udisk.html 日, 13 11月 2022 08:00:00 +0800
Clear Kernel Build Error? Fix It

when I compile Clear kernel with LLVM enabled, I got this error:

arch/x86/kernel/cpu/intel_epb.c:172:2: error: call to undeclared function 'sched_set_itmt_power_ratio';
ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
        sched_set_itmt_power_ratio(256 - val * 2, cpu);
        ^
arch/x86/kernel/cpu/intel_epb.c:172:2: note: did you mean 'sched_set_itmt_core_prio'?
./arch/x86/include/asm/topology.h:189:20: note: 'sched_set_itmt_core_prio' declared here
static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
                   ^
1 error generated.

it's obvious that the sched_set_itmt_power_ratio function is undeclared

so I added the following like the function on top of it

and it is able to compile :)

 ---  /home/gentoo/linux/topology.h
 +++  arch/x86/include/asm/topology.h
 @@ -189,6 +189,9 @@
 static inline void sched_set_itmt_core_prio(int prio, int core_cpu)
 {
 }
+static inline void sched_set_itmt_power_ratio(int prio, int core_cpu)
+{
+}
 static inline int sched_set_itmt_support(void)
 {
        return 0;

Notice: I'm ignorant about C programming, so if anything's wrong, please contact me

]]>
https://dongdigua.github.io/clear_kernel_compile_fix.html https://dongdigua.github.io/clear_kernel_compile_fix.html 五, 04 11月 2022 08:00:00 +0800
Gentoo LLVM_TARGETS not Working?

Recently, I would like to test switching from gcc to clang on my Gentoo VM.

warning: you will be crazy to have too many packages can't be build with clang

1. problem

First I want to make LLVM not targeting too many platform, but changing LLVM_TARGETS don't work

[ebuild  N     ] sys-devel/llvm-15.0.3:15::gentoo   USE= "binutils-plugin libffi
 ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd"
 LLVM_TARGETS= "(AArch64) (AMDGPU) (ARM) (AVR) (BPF) (Hexagon) (Lanai) (MSP430)
 (Mips) (NVPTX) (PowerPC) (RISCV) (Sparc) (SystemZ) (VE) (WebAssembly) (X86)
 (XCore) (-ARC) (-CSKY) (-DirectX) (-LoongArch) (-M68k) (-SPIRV)" 241 KiB    

2. and I found [solved] LLVM_TARGETS not respected?(Mar 2022) on gentoo forum

It seems that global LLVM_TARGETS setting is not respected,

and flags such as llvm_targets_AArch64, llvm_targets_ARM, are no longer there.

They're now forced by default as a precaution.

3. solution

3.1. add something like */* -llvm_targets_AArch64 into /etc/portage/profile/package.use.force

I excluded all targets exept for X86, but still 3 left: AMDGPU, BPF, NVPTX

3.2. so I also add sys-devel/llvm -llvm_targets_AMDGPU -llvm_targets_BPF -llvm_targets_NVPTX in /etc/portage/package.use/

3.3. and don't forget to add that three excluder to clang or other compiler that uses llvm

4. finally I got this:

[ebuild  N     ] sys-devel/llvm-15.0.3:15::gentoo   USE= "binutils-plugin libffi
 ncurses -debug -doc -exegesis -libedit -test -verify-sig -xar -xml -z3 -zstd"
 LLVM_TARGETS= "(X86) -AArch64 -AMDGPU (-ARC) -ARM -AVR -BPF (-CSKY) (-DirectX)
 -Hexagon -Lanai (-LoongArch) (-M68k) -MSP430 -Mips -NVPTX -PowerPC -RISCV
 (-SPIRV) -Sparc -SystemZ -VE -WebAssembly -XCore" 241 KiB
]]>
https://dongdigua.github.io/gentoo_llvm_targets.html https://dongdigua.github.io/gentoo_llvm_targets.html 六, 29 10月 2022 08:00:00 +0800
CentOS/Fedora 不同配置/变体都默认安装了什么软件(组)

for https://cossig.org(CentOS 中文特别兴趣小组)

link: https://www.cossig.org/391-centos-fedora-default-softwares

所以我这回不用英文了哈哈

1. CentOS

CentOS 安装时可选不同的配置

centos_install_config.png

其实这些就是不同的软件组

CentOS-Stream 8 为例, 定义软件组的文件是 comps.xml

左边的基本环境就是 tag 列表

一共有11个

< environment  variant= "BaseOS">
  < id>custom-environmentid>
  < name>Custom Operating Systemname>
  < display_order>5display_order>
   
environment>
< environment  variant= "BaseOS">
  < id>minimal-environmentid>
  < name>Minimal Installname>
  < display_order>4display_order>
   
environment>
< environment>
  < id>server-product-environmentid>
  < name>Servername>
  < display_order>2display_order>
   
environment>
< environment  arch= "aarch64,s390x,ppc64le,x86_64">
  < id>graphical-server-environmentid>
  < name>Server with GUIname>
  < display_order>1display_order>
   
environment>
< environment  variant= "BaseOS">
  < id>cloud-server-environmentid>
  < name>Cloud Servername>
  < display_order>3display_order>
   
environment>
< environment  variant= "BaseOS">
  < id>web-server-environmentid>
  < name>Web Servername>
  < display_order>50display_order>
   
environment>
< environment>
  < id>infrastructure-server-environmentid>
  < name>Infrastructure Servername>
  < display_order>60display_order>
   
environment>
< environment  variant= "AppStream"  arch= "x86_64,ppc64le">
  < id>developer-workstation-environmentid>
  < name>Development and Creative Workstationname>
  < display_order>90display_order>
   
environment>
< environment  variant= "AppStream"  arch= "x86_64,ppc64le">
  < id>gnome-desktop-environmentid>
  < name>GNOME Desktopname>
  < display_order>80display_order>
   
environment>
< environment  variant= "AppStream"  arch= "x86_64,ppc64le">
  < id>workstation-product-environmentid>
  < name>Workstationname>
  < display_order>3display_order>
   
environment>
< environment  variant= "AppStream"  arch= "x86_64">
  < id>virtualization-host-environmentid>
  < name>Virtualization Hostname>
  < display_order>70display_order>
   
environment>

但还是对不上, 应该很接近了…吧?

想起来不联网是没法选择安装软件的

然后瞅一眼产生的临时文件 /tmp/dnf.cache/

├── appstream-831abc7e9d6a1a72
│  ├── metalink.xml
│  └── repodata
│     ├── 95f4408838f85e23117d7d89ab47e1029692a443722e0e315fe3db07c32ee573-modules.yaml.xz
│     ├── 2047121fda8828f9b4d611cbfb736a89048cb411356e7ac2bdd95d927d044791-filelists.xml.gz
│     ├── e27fd8f9028bdc339a014f95debd07da4ef7b217522d14721af050aa9e7cf93e-primary.xml.gz
│     ├── f0d518764a274c71de0773b3590932ded56234b2f6ac4bf025d125b7ed29269f-comps-AppStream.x86_64.xml
│     ├── gen
│     │  └── groups.xml
│     └── repomd.xml
├── baseos-044cae74d71fe9ea
│  ├── metalink.xml
│  └── repodata
│     ├── 88ded6c02c5c3c62ab02250505cf0b8dee3af85819b666731c3cf813c275db6c-primary.xml.gz
│     ├── b47aeefede03d4d530f4538bf8f73531fd1a6a2bb66ca1778e3423c4dec34121-filelists.xml.gz
│     ├── d52d95f0f2d1a56b197a698aa328813a7e45e2d5b2883e04f4a3f604638b7a4a-comps-BaseOS.x86_64.xml
│     ├── gen
│     │  └── groups.xml
│     └── repomd.xml

那里面的 *-comps-*.xml

就正好是 1~4 和两个 99

comps-AppStream.x86_64.xml

< environment>
  < id>graphical-server-environmentid>
  < name>Server with GUIname>
  < description>An integrated, easy-to-manage server with a graphical interface.description>
  < display_order>1display_order>
  < grouplist>
    < groupid>base-xgroupid>
    < groupid>container-managementgroupid>
    < groupid>coregroupid>
    < groupid>fontsgroupid>
    < groupid>gnome-desktopgroupid>
    < groupid>guest-desktop-agentsgroupid>
    < groupid>hardware-monitoringgroupid>
    < groupid>hardware-supportgroupid>
    < groupid>headless-managementgroupid>
    < groupid>internet-browsergroupid>
    < groupid>multimediagroupid>
    < groupid>networkmanager-submodulesgroupid>
    < groupid>print-clientgroupid>
    < groupid>server-productgroupid>
    < groupid>standardgroupid>
  grouplist>
  < optionlist> optionlist>
environment>
< environment>
  < id>server-product-environmentid>
  < name>Servername>
  < description>An integrated, easy-to-manage server.description>
  < display_order>2display_order>
  < grouplist>
    < groupid>container-managementgroupid>
    < groupid>coregroupid>
    < groupid>hardware-supportgroupid>
    < groupid>headless-managementgroupid>
    < groupid>server-productgroupid>
    < groupid>standardgroupid>
  grouplist>
  < optionlist> optionlist>
environment>
< environment>
  < id>virtualization-host-environmentid>
  < name>Virtualization Hostname>
  < description>Minimal virtualization host.description>
  < display_order>99display_order>
  < grouplist>
    < groupid>basegroupid>
    < groupid>coregroupid>
    < groupid>standardgroupid>
    < groupid>virtualization-hypervisorgroupid>
    < groupid>virtualization-toolsgroupid>
  grouplist>
  < optionlist> optionlist>
environment>
< environment>
  < id>workstation-product-environmentid>
  < name>Workstationname>
  < description>Workstation is a user-friendly desktop system for laptops and PCs.description>
  < display_order>4display_order>
  < grouplist>
    < groupid>base-xgroupid>
    < groupid>coregroupid>
    < groupid>fontsgroupid>
    < groupid>gnome-desktopgroupid>
    < groupid>guest-desktop-agentsgroupid>
    < groupid>hardware-supportgroupid>
    < groupid>internet-browsergroupid>
    < groupid>multimediagroupid>
    < groupid>networkmanager-submodulesgroupid>
    < groupid>print-clientgroupid>
    < groupid>standardgroupid>
    < groupid>workstation-productgroupid>
  grouplist>
  < optionlist> optionlist>
environment>

comps-BaseOS.x86_64.xml

< environment>
  < id>custom-environmentid>
  < name>Custom Operating Systemname>
  < description>Basic building block for a custom RHEL system.description>
  < display_order>99display_order>
  < grouplist>
    < groupid>coregroupid>
  grouplist>
  < optionlist> optionlist>
environment>
< environment>
  < id>minimal-environmentid>
  < name>Minimal Installname>
  < description>Basic functionality.description>
  < display_order>3display_order>
  < grouplist>
    < groupid>coregroupid>
  grouplist>
  < optionlist> optionlist>
environment>
< environment>
  < id>server-product-environmentid>
  < name>Servername>
  < description>An integrated, easy-to-manage server.description>
  < display_order>2display_order>
  < grouplist>
    < groupid>coregroupid>
    < groupid>hardware-supportgroupid>
    < groupid>headless-managementgroupid>
    < groupid>server-productgroupid>
    < groupid>standardgroupid>
  grouplist>
  < optionlist> optionlist>
environment>

2. Fedora

Fedora 分不同的变体, 常见的是 Server 和 Workstation

与 CentOS 不同, Fedora 是在 kickstarts 定义的变体

[Payload] 中定义了安装哪些软件(组)

然后根据 comps.xml 就知道安装了什么软件

2.1. Workstation

workstation-product-environment

< environment>
  < id>workstation-product-environmentid>
  < _name>Fedora Workstation_name>
  < _description>Fedora Workstation is a user friendly desktop system for laptops and PCs._description>
  < display_order>2display_order>
  < grouplist>
    < groupid>base-xgroupid>
    < groupid>container-managementgroupid>
    < groupid>coregroupid>
    < groupid>firefoxgroupid>
    < groupid>fontsgroupid>
    < groupid>gnome-desktopgroupid>
    < groupid>guest-desktop-agentsgroupid>
    < groupid>hardware-supportgroupid>
    < groupid>libreofficegroupid>
    < groupid>multimediagroupid>
    < groupid>networkmanager-submodulesgroupid>
    < groupid>printinggroupid>
    < groupid>workstation-productgroupid>
  grouplist>
  < optionlist> optionlist>
environment>

2.2. Server

server-product-environment

< environment>
  < id>server-product-environmentid>
  < name>Servername>
  < display_order>2display_order>
  < grouplist>
    < groupid>server-productgroupid>
    < groupid>standardgroupid>
    < groupid>coregroupid>
    < groupid>hardware-supportgroupid>
    < groupid>headless-managementgroupid>
    < groupid>container-managementgroupid>
  grouplist>
  < optionlist> optionlist>
environment>
]]>
https://dongdigua.github.io/anaconda_kickstarts.html https://dongdigua.github.io/anaconda_kickstarts.html 四, 29 9月 2022 08:00:00 +0800
Matrix chat (clients comparation, proxy setting)

I wanna use matrix just because many people use it.

1. comparation of clients, sorted by satisfaction

1.1. neochat

💓kde

1.2. quaternion

small but have most of function

fancy scrollbar, can configure proxy in app

wayland support not good: error copying image(like qutebrowser)

1.3. ement.el

I like doing everything in emacs, with keyboard

but it don't work: https://github.com/alphapapa/ement.el/issues/77

1.4. fractal

HUGE and not fully fonctionall

1.5. thunderbird

all-in-one solution, matrix support is not good: cannot show picture

I even don't use it for email(I use Geary)

2. how to set proxy

2.1. neochat

env: http_proxy

2.2. fractal

env: https_proxy

accroding to reqwest document

2.3. ement.el

var: plz-curl-default-args

]]>
https://dongdigua.github.io/matrix.html https://dongdigua.github.io/matrix.html 四, 22 9月 2022 08:00:00 +0800
Build a Minimal NixOS LiveCD with swaywm

1. problem & solution

1.1. unable to drop root

donot run under root

1.2. in normal user, libseat permission deniened

add user in video group

login as user, not root

1.3. egl error

enable 3D acceleration in VirtualBox

1.4. config files from outside

irc-nixiso.png

but it is copied using xoriso to /iso/

so I need to write a systemd service to automagically sync it at boot

1.5. cleanup builds

/nix/store/ takes too much space after build

unlink result
nix-store 

and there're a few tools for visualising disk size:

https://nixos.wiki/wiki/Cleaning_the_nix_store

]]>
https://dongdigua.github.io/nixos.html https://dongdigua.github.io/nixos.html 六, 17 9月 2022 08:00:00 +0800
庄主其人

互联网是有记忆的

全都是你的所作所为

1. 扩充自 庄主人肉大炮 我的置顶评论

如果再遇到给它洗白的人, 可以把下面这些怼过去

1.1. 日月脏主 Wiki

大多数都在这里

1.4. fallen屠龙炮

最开始根本没有标注原作者, 而且还说"感谢TIS成员的帮助", 然而TIS成员并没有进行任何帮助

后来迫于压力才更改简介

]]>
https://dongdigua.github.io/moonboos.html https://dongdigua.github.io/moonboos.html 日, 11 9月 2022 08:00:00 +0800
画大饼

here are some of my ideas, most of which are unachieveable now

you can steal them, but you'd better let me know and add a reference

2. Rust wasm 制作 schemetic/litemetica 渲染器

3. 用 sway 实现 用窗口玩游戏(×)用游戏玩窗口(√)的效果

4. 不同 Linux 内核(xanmod, clear)玩 MC 性能对比

5. emacs mode: eww show console.log() in Message

6. win7WM

just a dream

7. join DN42

8. 一个能使用 APP(key) 功能的 bili 客户端

用于点踩和查看IP属地

9. 用 eww 实现苹果的 "灵动岛"?

呵呵, 在B站看到这样的基本就是壁纸软件的广告

]]>
https://dongdigua.github.io/ideas.html https://dongdigua.github.io/ideas.html 五, 09 9月 2022 08:00:00 +0800
Something About MGLNDD Scans

1. DONE stretchoid opt-out

it's this domain's workers that COMSTANTLY scanning the WHOLE internet

2. Some related link

2.2. SANS internet storm center diary

about the scanner and IP range

2.4. 【水蓝石】 近日图书馆出入人员信息逸事和小恶魔创造【持续更新】

博客主评价,有很多包括stretchoid.com的组织,有的是把自己伪装成科研实验用数据,并没有恶意,有的是什么理由也不给,只是不停地扫描全网的网站。

其中也包括像密歇根大学,加州大学伯克利分校的访问信息。因为网络安全领域没有类似于“希波克拉底誓言”的东西,所以不能像医生一样信任

就像到处晃别人家的门把手而不打开不是犯罪,但是真正的打开就混在发现没有锁门,而晃门把手时。

  1. HackerFactor: Scans & Attacks

2.5. zhihu:repost-translation: 如何建立一个基本的蜜罐

the original post is gone

您还可以开始执行DNS和WHOIS查找,以找出每次扫描背后的人员。

在这个简短的样本中,我找到了一个伪“研究员”:107.170.202.111解析为“zg-0301f-15.stretchoid.com”。

他们没有确定他们正在做什么或为什么他们在161 / udp扫描我的蜜罐。(端口161 / udp是为简单的网络管理协议(SNMP)保留的,并且经常容易受到攻击。)

是的,他们把“malicious”拼错了 - 因此它可能不会出现在谷歌搜索“stretchoid and malicious”的结果中。

]]>
https://dongdigua.github.io/weird_mglndd.html https://dongdigua.github.io/weird_mglndd.html 三, 17 8月 2022 08:00:00 +0800
Something About Wayland(swaywm)

1. Solution

1.1. iBus

1.1.1. reddit: ibus on swaywm

emacs pyim

1.2. Emacs transparent, terminal blur

sway can't, probably wayfire?

1.3. Authorization required, but no authorization protocol specified

1.3.1. sudo -E

1.3.2. lxpolkit(directly execute) or polkit-gnome(prettier, at /usr/libexec/polkit-gnome-authentication-agent-1)

1.4. cannot start sway on lightdm

yes, still not stable, and it can't remenber which DE you used last time

so use gdm is a better choice?

SDDM is fantastic! It is themeable,

I'm using elarun, a oxygen-like smooth crystal theme, materia-kde is also a good choice

1.5. obs

don't remove the include line in sway/config

1.6. cursor theme not working

from this issue

add seat seat0 xcursor_theme Oxygen_White in sway config file

1.8. notify-send don't work

mako, a notification daemon

1.10. emacs tool-bar not working(cannot toggle and icon theme missing)

1.10.1. cannot toggle: disable custon default-frame-alist, or just use floating mode

1.10.2. TODO icon theme missing: ?

1.11. Option –create on workspace prev_on_output|next_on_output?

this feature is not compatible with i3, so sway didn't accept the pr

2. Ref

2.4. prtsc is Print

xev/wev is helpful

2.6. Configs

2.6.1. https://github.com/ziap/dotfiles

a great config

2.6.2. Ruixi-rebirth's dotfiles

sway, very beautiful, from COSSIG

2.6.3. a Paid config

this is excellent, but…not for me, I'd like something simpler

  1. archcraft

2.6.4. 夜 - Yoru

awesome config!

]]>
https://dongdigua.github.io/wayland.html https://dongdigua.github.io/wayland.html 日, 07 8月 2022 08:00:00 +0800
Binary Exploit Resources I Recently Trying to Learn

1. resources

1.2. website

1.2.1. picoCTF

2. tools

2.1. code auditing

fedora_security_lab.png

2.1.1. pscan

2.1.2. rats

2.1.3. splint

2.1.4. flawfinder

2.2. debug

2.2.1. gdb

2.3. reverse

2.3.1. radare2

  1. iaito

2.3.2. hopper(non-free)

3. notes on video

3.1. 0x04: asm basics

3.1.1. to show assembly in the source code window in gud, M-x gdb-display-disassembly-buffer

3.2. 0x06: tools

3.2.1. simple tools

  1. hexdump

  2. strings

    all printable letters

  3. objdump

    disassembler

  4. strace/ltrace

    trace sys/lib call

3.2.2. 0x0A: deal with numbers

  1. endian?

    from Wikipedia

    Big-Endian.svg.png Little-Endian.svg.png

    x86 is little endian

  2. tools

    1. python

      >>>  int( '111', 2)
      7
      >>>  hex(123)
       '0x7b'
      >>>  import struct
       #  https://docs.python.org/3.10/library/struct.html#format-characters
      >>> struct.pack( ", 0x61626364)  #  little endian
      b 'dcba'
      >>> struct.pack( ">I", 0x61626364)  #  big endian
      b 'abcd'
      
    2. iex

      iex(1)> <<0x61626364::32>>
       "abcd"
      iex(2)>  Base.decode16( "61626364")
      { :ok,  "abcd"}
      
]]>
https://dongdigua.github.io/binary_exploit.html https://dongdigua.github.io/binary_exploit.html 三, 29 6月 2022 08:00:00 +0800
Recommend EverForest Theme

强烈推荐 everforest 这个主题

Everforest is a green based color scheme, it's designed to be warm and soft in order to protect developers' eyes.

是一个绿色系护眼主题, 正如名字, 有森林的气息

分为暗色和亮色, 每一种都有三种不同深浅的背景

作者是中国人, 制作了许多高质量 Vim 主题

1. emacs

这个主题在 2022-06-29 才开始制作 emacs 版本

目前还没在 melpa 上, 所以需要手动安装

我一看到这个就从 Nord 换过来了

我加入了 whitespace-mode 的支持, 默认的颜色太晃眼睛啦

希望大家能一起帮忙贡献这个主题

放一段 Rust 代码的效果

everforest.png

]]>
https://dongdigua.github.io/recommend_everforest_theme.html https://dongdigua.github.io/recommend_everforest_theme.html 一, 27 6月 2022 08:00:00 +0800
这一天终于来了, B站显示 IP 属地

卸载吧…

1. 我的看法

这个事情真正要打击的那些 诈骗/造假/海外势力, 并不会受到影响,

它们肯定会使用"虚拟专用网络"伪造IP.

那些所谓的"翻车"博主, 大多数可能只是公司在国内, 却因为这件事被各大媒体揪出来.

对于那些网络喷子, 这种事估计不会减少它们的言论, 反而会加重"地域黑"…

对于普通人, 大多数肯定是没什么影响, 也根本不在意,

但是有些人, 只想公开自己想让别人看见的,

那这种平台的强制行为确实会让TA们很不满.

2. 2022-7-25-12:00 公开显示 IP 属地

3. reference

3.1. from zhihu

掰锝胃, 这个链接的截图在B站不到半小时就被删除了…

B口口口口( ), 口口口口( ).

]]>
https://dongdigua.github.io/about_showing_ip.html https://dongdigua.github.io/about_showing_ip.html 六, 18 6月 2022 08:00:00 +0800
Editor Cheatsheet

1. VIM

1.1. deletion

key usage
D delete to end of line

1.2. edit

key usage
u/C-r 撤销/重做
c i { change inside {}
"{register}y/p 向/从寄存器拷贝

1.3. movement

key usage
w/e 下一个单词/单词尾
b 单词头
H/M/L 当前页面可见顶部/中间/底部
C-u(f)/d 上/下翻页
% 到对应括号
{} 段落跳转
g ; goto last change
g */# 正/反查找光标下的词
g d/D 跳转到本地/全局定义

1.4. visual

key usage next
C-v 矩形区域选择 S-i 插入, esc 批量执行

1.5. file/split

key usage
:n/:N 文件之间切换
:b 切换到文件
C-w h/j/k/l 切换分屏窗口
ZZ :wq

2. EMACS

2.1. org

key usage
C-c | 创建表格
C-c C-e 导出 HTML
C-c C-x C-v toggle render images
C-c C-l 编辑链接
C-c C-, org-insert-structure-template

Bold italic underline strikethrough code verbatim

2.2. normal

key usage
M-% 替换
M-; 区域切换注释
C-x C-; 行切换注释
C-y paste to minibuffer
M-&/! async/shell command
C-M-\ indent-region

2.3. eww/elpher (essensial)

key usage
TAB shr-next-link/elpher-next-link
d eww-download/elpher-download
g eww-reload/elpher-go
G eww
l eww-back-url
ˆ elpher-back-url
& eww-browse-with-external-browser
w eww-copy-page-url
C/c elpher-copy-current/link-url
v eww-view-page-source
. elpher-view-raw

3. Git

Git 能离线使用只是个传说, 你仍然需要联网搜索该用哪个命令传什么参数

git log --stat | perl -ne  'END { print $c } $c += $1 if /(\d+) insertions/;'
git log --pretty=tformat: --numstat | awk  '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
git log --color --graph --decorate -M --pretty=oneline --abbrev-commit -M

4. Fish

key usage
M-Left/Right jump world, or prevd/nextd
M-s sudo the last command
M-w what is this
]]>
https://dongdigua.github.io/cheatsheet.html https://dongdigua.github.io/cheatsheet.html 一, 13 6月 2022 08:00:00 +0800
Internet Collections

1. 一些(个人)博客收集

        _                                                  ___
 /\    /   _  ._ _|_  _. o ._    |\/|  _.  _  o  _  _. |    |  ._   _|  _
/--\   \_ (/_ |   |_ (_| | | |   |  | (_| (_| | (_ (_| |   _|_ | | (_| (/_ ><
                                           _|

1.2. qiusir    rssub

1.3. XahLee

Marisa_Kirisame_emacs_magic.png

1.4. 王垠

1.5. TODO Zed A. Shaw

1.6. 阮一峰    rssub

1.7. 黑客技术    hack

really good website, butt, no rss

1.8. 易姐

1.9. floooh(The Brain Dump)    c

07 年开始, cpu emulator

1.9.2. Modern C for C++ Peeps

Modern C is not a subset of C++

1.12. 这可太刑了

学习通事件相关

1.13. 写着写着就懂了    elixir

elixir/erlang大佬, 公众号: HelloElixir

1.14. lujun9972    emacs  rssub

超~~~多emacs

1.14.1. emacs document

1.15. 文辉的烂笔头    lowlevel

CPU, IC, ARM

第一次查过的问题,就应该记下来 !

第二次再查的问题,就必须记下来 !

1.15.2. 解决Org-Mode表格不对齐问题

更纱黑体 使中文恰好为英文宽度两倍, 使用字体比 valign 更通用, 但是不好看

1.16. scinart    lisp

13年最后更新

1.17. bozhang    rssable

05 年开始, 天文学

1.19. IceGuye

1.22. 第 N 个质数    c  algorithm

看不懂, 先收藏着

1.23. 阳光少年(coder.rs)    rust  python

1.24. mrxn    hack

网安, data-leak

1.25. include-yy    c  lisp  emacs

许多东方的图诶

1.25.2. 由(λ(x)(x x))看elisp与scheme之区别

这个问题其实就是 Lisp-1 和 Lisp-2 的区别导致的

Lisp-1 的变量命名空间和函数命名空间是统一的,而在 Lisp-2 中两者是分开的

  1. Xah Lee Lisp-1 vs Lisp-2

1.27. TODO Alynx Zhou    linux  rssable

东西很多

1.28. Core Dumped    rust  lowlevel  emacs

VM

1.29. keep coding    rust  c  lowlevel  backend

写代码的西瓜

1.29.1. EmacsTalk

1.30. Tomas Petricek    rssub

F#, M1(r0$0f+, very high quality

1.31. 弦外之音    c  lowlevel

源码分析

1.32. lightless blog    hack

1.33. The State of GPGPU in Rust    rust  lowlevel

1.34. Light & Truth

from ruanyifeng

1.38. UlyC    python

1.38.2. 2021年, 用更现代的方法使用PGP

同样是非对称算法, 为什么PGP的私钥就长这么多呢?

因为他们用的算法不同, 比特币默认使用的是ECDSA的 secp256k1算法, 该算法只是用来签名和认证, 并不用来加密

(signify 只用于签名认证, age 只用于加密, 所以密钥也比较短)

  1. 震惊! 竟然有人在 GitHub 上冒充我的身份!

1.39. kernal

Welcome to the darkest dungeon of kernal

1.41. vimacs

Written with Vim and Emacs

A member of Linux Club of Peking University.

cat-v-like sidebar style

1.43. Nyxt: Why should I care about Gopher?    gopher

By making something a little bit more inaccessible, we are inadvertently putting a filter on what is being posted.

This makes it a great way to avoid a lot of the low effort noise published on popular/accessible platforms.

As a result, Gopher is full of interesting, enriching, high quality content.

The authors are posting out of passion, and with great commitment.

Don't get me wrong, there's nonsense on Gopher too, but far less of it.

1.43.1. 社区本地人与永恒的九月(Eternal September)

几乎所有大众互联网社区都难逃此宿命。要想避免永恒九月,社区必须要足够克制,有节奏地引导新人加入。

但是过去20年互联网行业大发展的基本模式就是吸引大量用户、获取大平台地位、取得超额收益。

用户量是商业成功的互联网平台所必须追求的第一目标。要想获得商业成功,永恒九月来得越早越凶猛越好。

Internet_is_Full_-_Go_Away_t-shirt.jpg

1.44. Peter 's Homepage    rssub

GE d@ s: a C++$ UBL+++$ P++(–)$ L++(-)$ !E W+++(-)$ !N !o K–? w !O !M !V PS++ PE- Y+ PGP+ t+ 5+++ X+ R tv b+ DI D+ G e++ h r+++ y+++*

1.44.1. Gopher? Gopher.

1.46. phenix3443    c  emacs

刘尚亮

1.47. julienblanchard/typed-hole    plan9

1.47.1. pmikkelsen

1.49. 金步国作品集    lowlevel  linux

kernel, LFS

1.51. B

1.51.1. yanemame

猴哥推荐的

1.51.2. 我不会编程

EvanMeek

B站: 美味的樱桃菌

1.51.3. CC    linux

B站: 称呼我C先生

1.51.4. lunaixsky    c  lowlevel

1.51.5. EndlessPeak    linux

1.52. ZhiHu

1.52.2. 倔强的程序员

编! 译! 原! 理!

1.52.3. 专栏: 技术考古    plan9

plan9

1.52.4. 专栏: 嘶吼RoarTalk    hack

回归最本质的信息安全

1.52.6. 如何解读EVA

人需不需要存在的意义

人需不需要互相之间完全理解

自我封闭是否是应对外界压力的合理方式

1.53. shenjack/HWS/fri3nds

1.53.1. 老网虫

1.53.2. yang-qwq

1.53.3. zhanganzhi

1.53.4. 芒果快评

今年的新博客, 友链有踏浪

2. YouTube 收集(没有账号, 这就是我的收藏夹)

2.1. Computer Science

2.1.9. tsoding irc client in ocaml

0:50 List.fold_left faster than fold_right, but haskell is opposite

1:00 I like ocaml, that's how python should look like,

but ocaml itself is not ideal, you have to take ocaml and throw O away, and that's perfect

1:03 to be fair p___hub is more interesting than this, that's for sure, so let's use Makefile (instead of dune)

1:50 sexplib?

2:14 "how many american server you have already hacked" - "I don't count them I'm sorry"

2.1.14. tsoding: Parsing Java Bytecode with Python

0:05 look how TINY Java code is

0:06 nonono all the opensource are controlled by coporation actually,

they create a text editor plugin and sell the free code for $10 a month

2.5. ?

2.5.3. Why I'm Suing YouTube.

a story about YouTube’s intentional efforts to undermine the United States of America in collusion with the Russian government.

It’s also a story about copyright infringement

— and YouTube’s willful blindness to bad actors who openly admit

to filing patently fraudulent DMCA counter-notifications to avoid the termination of their accounts.

2.5.5. Beating 5 Scam Arcade Games with Science

街机科学家~

4. Other

4.1. Python-5

from tsoding's first porth video, (he is using debian, 37:00 copilot xd)

4.2. cat -v

not only harmful stuff <3

4.3. fediverse wiki

The Fediverse is a giant Network of social media platforms

4.3.1. there's another thing webmention which I found from Xe's blog

4.5. Adequacy: Is Your Son a Computer Hacker?

BSD, Lunix, Debian and Mandrake are all versions of an illegal hacker operation system,

invented by a Soviet computer hacker named Linyos Torovoltos.

4.6. GNU C Language Intro and Reference Manual

To any NSA and FBI agents reading my email: please consider

whether defending the US Constitution against all enemies,

foreign or domestic, requires you to follow Snowden's example.

4.8. oxygenos

his final year project in high school, 2008

a webos using oxygen visual design

4.11. gccemacs

4.11.1. slides_els2020

]]>
https://dongdigua.github.io/internet_collections.html https://dongdigua.github.io/internet_collections.html 日, 05 6月 2022 08:00:00 +0800