Jinfang's Personal Page

如果有一天你突然想起了我

用户工具

站点工具


blog

这是blog的展示页面,按时间排序了blog文件下的内容
右边的目录每次展示9篇
滑倒最下面可以翻页看到后面或前面的9篇


改变MAC地址

计算机通常有两个MAC地址,每个MAC地址对您的设备都是唯一的。当接入以太网时使用一个地址,而另一个地址在连接到WiFi网络时可见。如果电脑启用了WiFi,笔记本电脑会在搜索要连接的WiFi网络时广播其MAC地址。 mac地址与设备有关联所以要保持匿名就需要改变MAC地址。

MAC Changer是一个可以可以随机改变地址的工具。 https://github.com/alobbs/macchanger mac os安装

brew install macchanger

debian安装

apt-get install macchanger

使用ifconfig获取网络命名

获取当前地址

macchanger eth0 -s

分配新的随机MAC地址

sudo macchanger eth0 -r

2025/05/05 16:47 · jinfang

商用的vpn

比较参数:

司法所在地

是否记录日志

是否支持数字货币支付

易用性

价钱

稳定性

2025/05/05 16:46 · jinfang

使用PGP

给vpn厂商反馈邮件用到了pgp现在还没搞懂理一下过程。

我用的是mac 需要安装两个软件和一个插件(GnuPG,Mozilla Thunderbird和Enigmail) 这是eff的教程https://ssd.eff.org/en/module/how-use-pgp-mac-os-x os/x的GnuPG的使用 创建一个非对称密钥

gpg2 –gen-key 导出公钥

gpg2 –armor –[email protected] > a.asc 导入对方的密钥

gpg2 –import xxx.asc 加密消息

gpg2 –armor –encrypt –recipient 收件人邮箱 message.txt 解密消息

gpg2 –decrypt message.txt.asc > message.txt

使用私钥解密文件需要使用密码

2025/05/05 16:46 · jinfang

Homebrew使用命令

Homebrew是Mac OSX上的软件包管理工具类似于apt-get。

安装 Homebrew

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

使用

https://docs.brew.sh/FAQ

安装软件:brew cask install go

搜索软件:brew search go

卸载软件:brew cask uninstall go

删除下载的包:brew cleanup

更新所有软件:brew upgrade

显示已安装软件:brew list

查看软件信息:brew info go

显示包依赖:brew reps

查看那些已安装的程序需要更新: brew outdated

清理旧版本:brew cleanup

搜索可以安装的软件

https://caskroom.github.io/search

2025/05/05 16:45 · jinfang

手动删除mac软件

mac上删除软件通常只是删除了/Applications里的xxx.app虽说是删除了最大体积的文件但还是会留下很多痕迹需要一个个去删除。

对于某个用户

~/Library

~/Library/Application Support

插件和缓存

~/Library/Application Support/CrashReporter

~/Library/Caches

~/Library/Containers

~/Library/LaunchAgents

启动配置文件

~/Library/Preferences

App设置

~/Library/PreferencePanes

对于所有用戶(安装时请求过管理员权限)

/Library

/Library/Application Support

/Library/Extensions

/Library/LaunchAgents

/Library/LaunchDaemons

/Library/PreferencePanes

/Library/Preferences

2025/05/05 16:44 · jinfang

在小内存设备上安装bitcoin core钱包

首先安装官方钱包,在钱包的文件夹内新建一个

bitcoin.conf #文件名

prune=550 #文件内容

完成后需要先全部同步一遍区块,之后每次只同步新的区块。

2025/05/05 16:44 · jinfang

一个设备配置多个git key

全文摘自https://www.jianshu.com/p/93f846cef40d 生成key

ssh-keygen -t rsa -C “mail” 在.ssh文件夹添加config

Host github.com #不同点,可更改

  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_1

Host github2.com #不同点

  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa_2

清空本地的 SSH 缓存

ssh-add -D

ssh-add ~/.ssh/id_rsa_1

ssh-add ~/.ssh/id_rsa_2 设置git用户名和邮箱

# 取消全局 用户名/邮箱 配置

$ git config –global –unset user.name

$ git config –global –unset user.email

# 进入项目文件夹,单独设置每个repo 用户名/邮箱

$ git config user.email “mail”

$ git config user.name “name”

重建 origin

git remote rm origin

git remote add origin [email protected]:user/xxx.git

ssh 客户端是通过类似 [email protected]:user/xxx.git 的地址来识别使用本地的哪个私钥的,地址中的 User 是@前面的git, Host 是@后面的github.com。

2025/05/05 16:43 · jinfang

OpenBSD在VirtualBox和安装xfce

新建系统设置VirtualBox 按提示安装后设置源安装xfce

export PKG_PATH=https://cloudflare.cdn.openbsd.org/pub/OpenBSD/6.3/packages/amd64/

pkg_add nano

nano .profile

pkg_add xfce slim slim-themes

nano .xinitrc

cp .xinitrc /home/user/

usermmod -G wheel user

nona /etc/rc.conf.local

nano /etc/rc.local

发现这篇笔记在搜索引擎的前列但我写的不详细可能很多人看不懂找了YouTube上的一个视频放在下面

<iframe width=“560” height=“315” src=“https://www.youtube.com/embed/eOxtjGQVAFk?rel=0” frameborder=“0” allow=“autoplay; encrypted-media” allowfullscreen></iframe>

2025/05/05 16:42 · jinfang

Debian安装nextcloud

(初步安装未做安全优化) 安装步骤

apt-get update

apt-get upgrade

apt-get vim zip sudo

apt-get install apache2 mariadb-server libapache2-mod-php7.0

apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring

apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-x`ml php7.0-zip

systemctl start apache2

systemctl enable apache2

systemctl start mysql

systemctl enable mysql

reboot

配置MariaDB

mysql_secure_installation 设置数据库

mysql -u root -p

创建名为nextclouddb的数据库

MariaDB [(none)]>CREATE DATABASE nextclouddb;

创建nextcloud用户名和密码

MariaDB [(none)]>CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'password';

MariaDB [(none)]>GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'localhost';

重新加载MariaDB权限

MariaDB [(none)]>FLUSH PRIVILEGES;

退出

MariaDB [(none)]>\q 安装NextCloud

wget https://download.nextcloud.com/server/releases/nextcloud-13.0.4.zip

unzip nextcloud-13.0.4.zip

mv nextcloud /var/www/html/

chown -R www-data:www-data /var/www/html/nextcloud

设置配置

vi /etc/apache2/sites-available/nextcloud.conf

Alias / “/var/www/nextcloud/”

<Directory /var/www/nextcloud/>

Options +FollowSymlinks
AllowOverride All

[IfModule mod_dav.c](file:/home/j/Notes/202207%E4%BB%A5%E5%89%8D%E7%9A%84log/_posts/2018/IfModule%20mod_dav.c) Dav off </IfModule> SetEnv HOME /var/www/nextcloud SetEnv HTTP_HOME /var/www/nextcloud </Directory> 链接配置 ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf 关闭默认配置 a2dissite 000-default a2ensite nextcloud 其他 a2enmod rewrite a2enmod headers a2enmod env a2enmod dir a2enmod mime a2enmod setenvif 重启apache2 systemctl restart apache2 ufw使用 启用 ufw enable 使用方法 ufw allow 80 ssl a2enmod ssl a2ensite default-ssl service apache2 reload 配置php 找到php.ini文件地址 php -i | grep “Loaded Configuration File” 添加 opcache.enable=1 opcache.enable_cli=1 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=10000 opcache.memory_consumption=128 opcache.save_comments=1 opcache.revalidate_freq=1 错误 起因 service apache2 restart Job for apache2.service failed. See “systemctl status apache2.service” and “journalctl -xe” for details. 解决方法 cd /etc/apache2 apache2ctl configtest

2025/05/05 16:41 · jinfang

更早的文章 >>

blog.txt · 最后更改: 2025/03/21 17:05 由 jinfang