• 禁止Spotlight对外部磁盘建立索引

     · Grape

    使用 System Preferences

    1. 打开 系统设置(System Preferences)或 系统偏好设置。
    2. 选择 Spotlight。
    3. 切换到 Privacy(隐私)标签。
    4. 点击 ”+” 按钮,将外部磁盘添加到列表中。
    5. 确认后,Spotlight 将 …
  • The system has been destroyed

     · Grape

    今天将自己的一个旧手机Redmi Note 8找出来,想刷一个最新版本的全球版ROM : ginkgo_global_images_V12.5.2.0.RCOMIXM_20220216.0000.00_11.0_global_da0a599e0c.tgz。下载解压完成,直接运行flash_all.sh脚本完成刷机,但系 …

  • SOCKS5

     · Grape

    socks是一种互联网协议,它通过一个代理服务器在客户端和服务端之间交换网络数据。

    简单来说,它就是一种代理协议,扮演一个中间人的角色 …

  • Markdown 在 Pelican上的的支持情况

     · 5 min read  · Grape

    Pelican is a static site generator, written in Python. Highlights include: - Write your content directly with your editor of choice in reStructuredText or Markdown formats - Includes a simple CLI tool to (re)generate your site - Easy to interface with distributed version control systems and web hooks - Completely static output is …

  • Linux Command : grep & sed

     · Grape

    如何利用grep和sed实现搜索和替换

    grep -Erl "M\\('local" .|xargs sed -Ei "" "s/M\\('local/M\\('remote/g"
    
    grep -Erl "http://loca" .|xargs sed -Ei "" "s/http:\/\/local/http:\/\/remote/g"
    

    grep

    • -E 将样式为延伸的普通表示法来使用
    • -r 此 …
  • Linux常用命令工具使用笔记

     · 3 min read  · Grape

    find

    在当前目录下查找某个文件:

    find -name "lib*.a"
    

    rsync

    Linux 下合并两个目录,软连接也一起同步。

    rsync -K -a 源目录  被覆盖目录
    

    比如:

    rsync -K -a …
  • Linux Process

     · Grape

    概念

    程序是一系列指令的集合,通常存为可执行文件。进程是程序的执行过程。

    进程属性

    使用ps可以查看系统正在运行的进程。 ps --help显示该命令的用法。

    ps -e -o USER,PID,PPID,GID,NAME
    USER …
  • Docker 基础

     · 2 min read  · Grape

    Dockerizing a Python Flask App

    Install nginx 1.27.2

    docker pull nginx:1.27.2
    docker pull python:3.13
    
    services:
      web:
        container_name: example_nginx
        image: nginx:1.27.2
        privileged: true
        ports:
          - 80:80
          - 443:443
        volumes:
          - "$PWD/html:/usr/share/nginx/html:rw"
          - "$PWD/conf/conf.d:/etc …
  • Github Usage

     · 1 min read  · Grape

    如何修改第一条的作者信息

    git commit --amend --author="developer <[email protected]>" --no-edit
    

    如何修改第一条注释信息

    git commit --amend
    

    子模块

    递归更新子模块:

    git submodule add <remote url …
  • 7z 解压文件名乱码

     · Grape

    问题描述

    在Windows 7中文版系统上使用7z压缩一些文件后,然后在Windows 10 Pro英文版系统上解压,发现凡是文件名中包含中文,最后都是乱码。

    原因

    使用7z压缩文件时,对文件名的编码是采用Windows 系统默 …