护城河暂时还能挺住,ai暂时还无法识别
《挑灯码字偶成》
—— deepseek
更深键落似弹筝,星斗屏前谱纵横
未惧青丝删减尽,一宵创世一书生
《编程夜乐》
—— chatgpt
夜深灯火映屏前,指尖飞舞乐无边
代码千行心自喜,何惧孤单与熬年
找出所有大于或等于源文件的缩略图
find . -type f ! -name '*.thumb.jpg' -print0 | while IFS= read -r -d '' src; do
thumb="${src}.thumb.jpg"
if [ -f "$thumb" ]; then
src_size=$(stat -c '%s' "$src")
thumb_size=$(stat -c '%s' "$thumb")
if [ "$thumb_size" -ge "$src_size" ]; then
echo "...
到谷歌下载代码库:
https://developers.google.com/speed/webp/download
点击“下载代码库”,进入:
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html
拉到最下面找到“libwebp-x.x.x-linux-x86-64.tar.gz”字样的链接,右键复制链接地址下载,比如现在最新的是libwebp-1.6.0-linux-x86-64.tar.gz,如:
wget https://storage.googleapis....
Python
import time
start = time.perf_counter()
# 测试代码
for _ in range(1_000_000):
pass
end = time.perf_counter()
print(f"耗时: {end - start:.6f} 秒")
Ruby
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
# 测试代码
1_000_000.times { }
finish = Process.clock_gettime(Proc...
sudo dd if=/dev/zero of=/EMPTY bs=1M status=progress || true
sudo rm -f /EMPTY
sync
dd 会把 所有空闲块写成 0,VirtualBox 才能在导出时真正丢弃这些块。
# 递归查找 .js.gz / .css.gz 比源文件老 1 分钟以上(排除 plugins)
find . \
-path "*/plugins/*" -prune -o \
\( -name "*.js.gz" -o -name "*.css.gz" \) -print0 |
while IFS= read -r -d '' gz; do
src="${gz%.gz}"
if [ -f "$src" ]; then
gz_t=$(stat -c %Y "$gz")
src_t=$(stat -c %Y "$...
mkdir -p ~/.config/systemd/user
vi ~/.config/systemd/user/tmux.service
输入以下内容:
[Unit]
Description=tmux default session
After=network.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c '/usr/bin/tmux has-session -t aaaaaaaaaaaaaaaaaaaaaaaa || /usr/bin/tmux new-session -d -s aaaaaaaaaaaaa...
亲测,含不含镜像导出的包都是一样大的。
也就是说虚拟机含有再多的镜像也不会导致打包变大,打包导出的时候只会导当前虚拟机的数据。
导出虚拟电脑之前不用删快照,放心的导出就是了。
1、设置静态IP
sudo vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# Th...
文件:/etc/apt/sources.list
ftp.cn.debian.org 源:
#deb cdrom:[Debian GNU/Linux 13.3.0 _Trixie_ - Official amd64 NETINST with firmware 20260110-10:59]/ trixie contrib main non-free-firmware
deb http://ftp.cn.debian.org/debian/ trixie main non-free-firmware
deb-src http://ftp.cn.debian.org/debi...
惨痛教训,文件名含有中文的时候导出操作一切正常,导入的时候就完蛋了,根本无法导入。只能重装系统重新导出备份
替换掉 node_modules/@types/jquery/JQuery.d.ts 文件即可
替换掉以后 vscode 中 jquery 的方法就不会出现删除线了
注:此文件为 3.5.33 版本,即 @types/jquery@3.5.33
git gc --aggressive --prune=now
git repack -a -d --depth=250 --window=250
# 优化完查看.git目录大小
du -sb .git
# 备份所有镜像
docker save -o blog_image.tar blog_image; \
docker save -o down_image.tar down_image; \
docker save -o mysql5.5_image.tar mysql5.5_image; \
docker save -o mysql_image.tar mysql_image; \
docker save -o www_image.tar www_image;
# 删除所有容器
docker rm -f $(docker ps -aq)
# 删除所有镜像
d...