Tag: Libvirt
libvirt无法与主机通信解决回顾
先放结论
If firewalld is active on the host, libvirt will attempt to place the bridge interface of a libvirt virtual network into the firewalld zone named **“libvirt” ** (thus making all guest->host traffic on that network subject to the rules of the “libvirt” zone).
我需要在firewalld (I am using a Fedora host)的libvirt区域中添加对应的放行规则:
Tag: Linux
libvirt无法与主机通信解决回顾
先放结论
If firewalld is active on the host, libvirt will attempt to place the bridge interface of a libvirt virtual network into the firewalld zone named **“libvirt” ** (thus making all guest->host traffic on that network subject to the rules of the “libvirt” zone).
我需要在firewalld (I am using a Fedora host)的libvirt区域中添加对应的放行规则:
Radicale with Caddy v2
In this article (in Chinese), I discussed installing and using Radicale in termux. However, in most sceneries we are more likely to put radicale behind a web proxy. In this article I take notes on how did I make radicale work with Caddy v2.
If you search “radicale with caddy”, you are more likely to find information about using radicale with Caddy v1. By explicitly searching “radicale with caddy v2” you can fetch meaningful answers as in this post. Though I didn’t find the very post before I worked out the solution myself. T_T
Learn from Linux from Scratch (LFS) (Part 2)
在Part 1中,涉及的知识点主要集中在宿主机上准备构建环境。本篇将记录对应于书中第5章”Constructing a Temporary System”一章的从“Introduction”到“GCC-9.2.0 – Pass 2”有关内容。
Learn from Linux from Scratch (LFS) (Part 1)
Learn from Linux from Scratch (LFS)这个系列的文章是我在阅读Linux from Scratch 9.1过程中的笔记。我用的宿主系统为CentOS 8(运行于VituralBox虚拟机中,VirtualBox虚拟机的Host是Windows 10)。
SELinux学习笔记
前排提示(2022-08-18):这 post 一直躺在我的草稿箱里面,没有写完,但不发出来又觉得难过
基于规则的安全模型
具体地说,在CentOS和Fedora的默认配置中,SELinux使用的targeted策略只覆盖了有限的(系统)应用程序。用户,特别是在/usr/local和/home目录运行的东西不受targeted约束。设计这样的默认配置显然是为了在易用性和安全性之间取得某种平衡。
使用Radicale建立你的私有日历和联系人同步服务器
换手机了,发现新手机完全不能兼容google play,看log是少一个权限无法申请。不知道是不是google单方面ban了华为,或者华为单方面ban了google。不管怎么样我想要同步我的google账号上的日历和联系人是不可能了。
就在我导出google日历和联系人的时候,我又开始在想那个问题了:数据不在自己的手上,有一天可能就找不回来了。能不能自己搭建一个私有云呢?说到私有云我立刻想到了Nextcloud,但是看到Nextcloud的各种php、数据库还有http服务器依赖之后我觉得太麻烦了——我的需求是日历同步,Nextcloud一套上来过于复杂了,而且不够轻量。
于是我找到了Radicale这个开始于学校作业的项目。这个项目基本上可以在任何能运行Python的地方运行。它支持的CalDAV协议。这种协议的客户端的话,PC上的邮件和日历app基本都支持这个协议,我用的是thunderbird。手机上的话,貌似华为不能直接支持这种协议,得装个DAVx5。
GNU nano basics| nano编辑器的使用提示
命令行选项
-m 此选项可激活鼠标,按住shift建即可选择文本。对应nanorc的set mouse
-l 显示行号。对应nanorc的set linenumbers
-E或--tabstospaces 把已有文件中的tab转换为空格。对应nanorc的set tabstospaces
-i或--autoindent 启动自动缩进。对应nanorc的set autoindent
-A或--smarthome启动智能home键。对应nanorc的set smarthome
-$或--softwrap 开启自动折行。对应nanorc的set softwrap
Linux主机获取校园网的ipv6地址……
这个是迷一样——我在Windows 10上,我的Android手机上,都能获取到global IPv6地址,可是一到我的Fedora Linux就只能获取到fe开头的非global地址……
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
关于创建U盘启动盘的一点思考 | Some considerations when creating bootable flash disks
分区表
U盘在出厂时多半会使用MS-DOS格式的分区表,而不是现代硬盘中常见的GPT。我猜可能是因为需要考虑到兼容性?
分区和文件系统
如果你只用Linux,那么你尽管分区,理论上现代的Linux发行版都能将你U盘上的分区识别出来,无论是通过图形用户界面的自动识别还是通过lsblk然后用mount命令挂载。
但是,如果你还用Windows,并且你希望你创建的可启动U盘同时也能正常地当作一个大容量存储器,分区的时候最好注意以下几点:
- 分区表采用MS-DOS格式;
- 作为普通U盘那样存储数据部分的分区,必须是第一个分区,而且必须是主分区;
- 作为数据存储的这个分区应该使用Windows原生支持的文件系统,而且最好是U盘出厂时使用的文件系统(对于32G以内的U盘,一般来说是FAT32);
- 作为可引导的分区,也就是存放U盘操作系统的分区,应该被设为可启动分区。
ssh connect through sock5 proxy
This post provides a straightforward method to connect your ssh client through a local socks5 proxy.
It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:
ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name
If you are not using nmap’s netcat utility, you may try:
ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。
Tag: Virt-Manager
libvirt无法与主机通信解决回顾
先放结论
If firewalld is active on the host, libvirt will attempt to place the bridge interface of a libvirt virtual network into the firewalld zone named **“libvirt” ** (thus making all guest->host traffic on that network subject to the rules of the “libvirt” zone).
我需要在firewalld (I am using a Fedora host)的libvirt区域中添加对应的放行规则:
Tag: Virtualization
libvirt无法与主机通信解决回顾
先放结论
If firewalld is active on the host, libvirt will attempt to place the bridge interface of a libvirt virtual network into the firewalld zone named **“libvirt” ** (thus making all guest->host traffic on that network subject to the rules of the “libvirt” zone).
我需要在firewalld (I am using a Fedora host)的libvirt区域中添加对应的放行规则:
Tag: Caddy
Radicale with Caddy v2
In this article (in Chinese), I discussed installing and using Radicale in termux. However, in most sceneries we are more likely to put radicale behind a web proxy. In this article I take notes on how did I make radicale work with Caddy v2.
If you search “radicale with caddy”, you are more likely to find information about using radicale with Caddy v1. By explicitly searching “radicale with caddy v2” you can fetch meaningful answers as in this post. Though I didn’t find the very post before I worked out the solution myself. T_T
Tag: Radicale
Radicale with Caddy v2
In this article (in Chinese), I discussed installing and using Radicale in termux. However, in most sceneries we are more likely to put radicale behind a web proxy. In this article I take notes on how did I make radicale work with Caddy v2.
If you search “radicale with caddy”, you are more likely to find information about using radicale with Caddy v1. By explicitly searching “radicale with caddy v2” you can fetch meaningful answers as in this post. Though I didn’t find the very post before I worked out the solution myself. T_T
Tag: Lfs
Learn from Linux from Scratch (LFS) (Part 2)
在Part 1中,涉及的知识点主要集中在宿主机上准备构建环境。本篇将记录对应于书中第5章”Constructing a Temporary System”一章的从“Introduction”到“GCC-9.2.0 – Pass 2”有关内容。
Learn from Linux from Scratch (LFS) (Part 1)
Learn from Linux from Scratch (LFS)这个系列的文章是我在阅读Linux from Scratch 9.1过程中的笔记。我用的宿主系统为CentOS 8(运行于VituralBox虚拟机中,VirtualBox虚拟机的Host是Windows 10)。
Tag: Algorithm
阴阳师爬塔与迷宫生成算法
最近的阴阳师缘结神活动新增了走迷宫的要素。几百层的迷宫不可能手动绘制吧?于是想到了是不是有迷宫生成算法。
能查到的迷宫生成算法有三种:递归回溯、 随机prim算法、 递归分割。前两种属于“拆墙法”,而递归分割则是“造墙法”。先放一下结论:
Tag: Selinux
SELinux学习笔记
前排提示(2022-08-18):这 post 一直躺在我的草稿箱里面,没有写完,但不发出来又觉得难过
基于规则的安全模型
具体地说,在CentOS和Fedora的默认配置中,SELinux使用的targeted策略只覆盖了有限的(系统)应用程序。用户,特别是在/usr/local和/home目录运行的东西不受targeted约束。设计这样的默认配置显然是为了在易用性和安全性之间取得某种平衡。
Tag: Caldav
使用Radicale建立你的私有日历和联系人同步服务器
换手机了,发现新手机完全不能兼容google play,看log是少一个权限无法申请。不知道是不是google单方面ban了华为,或者华为单方面ban了google。不管怎么样我想要同步我的google账号上的日历和联系人是不可能了。
就在我导出google日历和联系人的时候,我又开始在想那个问题了:数据不在自己的手上,有一天可能就找不回来了。能不能自己搭建一个私有云呢?说到私有云我立刻想到了Nextcloud,但是看到Nextcloud的各种php、数据库还有http服务器依赖之后我觉得太麻烦了——我的需求是日历同步,Nextcloud一套上来过于复杂了,而且不够轻量。
于是我找到了Radicale这个开始于学校作业的项目。这个项目基本上可以在任何能运行Python的地方运行。它支持的CalDAV协议。这种协议的客户端的话,PC上的邮件和日历app基本都支持这个协议,我用的是thunderbird。手机上的话,貌似华为不能直接支持这种协议,得装个DAVx5。
Tag: Cloud
使用Radicale建立你的私有日历和联系人同步服务器
换手机了,发现新手机完全不能兼容google play,看log是少一个权限无法申请。不知道是不是google单方面ban了华为,或者华为单方面ban了google。不管怎么样我想要同步我的google账号上的日历和联系人是不可能了。
就在我导出google日历和联系人的时候,我又开始在想那个问题了:数据不在自己的手上,有一天可能就找不回来了。能不能自己搭建一个私有云呢?说到私有云我立刻想到了Nextcloud,但是看到Nextcloud的各种php、数据库还有http服务器依赖之后我觉得太麻烦了——我的需求是日历同步,Nextcloud一套上来过于复杂了,而且不够轻量。
于是我找到了Radicale这个开始于学校作业的项目。这个项目基本上可以在任何能运行Python的地方运行。它支持的CalDAV协议。这种协议的客户端的话,PC上的邮件和日历app基本都支持这个协议,我用的是thunderbird。手机上的话,貌似华为不能直接支持这种协议,得装个DAVx5。
Tag: Sync
使用Radicale建立你的私有日历和联系人同步服务器
换手机了,发现新手机完全不能兼容google play,看log是少一个权限无法申请。不知道是不是google单方面ban了华为,或者华为单方面ban了google。不管怎么样我想要同步我的google账号上的日历和联系人是不可能了。
就在我导出google日历和联系人的时候,我又开始在想那个问题了:数据不在自己的手上,有一天可能就找不回来了。能不能自己搭建一个私有云呢?说到私有云我立刻想到了Nextcloud,但是看到Nextcloud的各种php、数据库还有http服务器依赖之后我觉得太麻烦了——我的需求是日历同步,Nextcloud一套上来过于复杂了,而且不够轻量。
于是我找到了Radicale这个开始于学校作业的项目。这个项目基本上可以在任何能运行Python的地方运行。它支持的CalDAV协议。这种协议的客户端的话,PC上的邮件和日历app基本都支持这个协议,我用的是thunderbird。手机上的话,貌似华为不能直接支持这种协议,得装个DAVx5。
Tag: Cnn
Pytorch模型训练翻车记录
背景
在Google Colab上进行压缩采样的图像重建模型的训练。已经有了训练好的压缩率是0.20的模型(下文用r0.20之类的记号表示压缩率及其对应的模型)。现在想训练r0.25。觉得从头开始训练很费时间于是就想出了这么个办法
Tag: Pytorch
Pytorch模型训练翻车记录
背景
在Google Colab上进行压缩采样的图像重建模型的训练。已经有了训练好的压缩率是0.20的模型(下文用r0.20之类的记号表示压缩率及其对应的模型)。现在想训练r0.25。觉得从头开始训练很费时间于是就想出了这么个办法
Tag: Python
lambda in Python: is it returning multiple values?
To begin with let’s just have look at the old school of lambda in Python.
As we know, lambda x: return x**2 is exactly equivalent to
def squared(x): return x**2
Now look at this
>>> f1 = lambda x,y,z: x+1, y+1, z+1
>>> print(f1(1,1,1))
What will you get on the screen? A tuple of (2, 2, 2)? No. You get an error instead.
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
print(f1(1,1,1))
TypeError: 'tuple' object is not callable</module>
Now that the “returning part” of lambda is covering the contents before comma only, let’s explicitly add the brackets:
Quick note on Python syntax magics
As noted in Python 3 documention, behaviors of +, -, *, etc. can be redefined.
Specially, I would like to take notes on some special yet common methods.
__repr__ method
This method is called when you apply print on the instance. Could be useful when debugging class related problems.
__enter__, __exit__ methods
Those two methods are key components of a context manager. Refer to https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/ to get a sense on how to manage the fragile resouces with context manager.
Windows上通过pip安装Python软件包遭遇“UnicodeDecodeError”的解决
简而言之,如果你通过Windows自带的命令提示符(cmd)启动了pip,并且看到了类似下面的错误提示
in console_to_strreturn s.decode(sys.__stdout__.encoding)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte
多半是因为命令提示符当前使用的代码页不是UTF-8。使用命令chcp,将当前代码页切换成UTF-8即可解决:
Tag: 吐槽
冷吟閒醉
Windows 10的累积更新始终装不上,然而我前天还在称赞Windows 10的厂商支持比较好。
真是为难啊,Linux不受厂商待见,高性能的驱动很难装上(别看别人了,说你呢nVidia)。支持较好的Windows现在却无法更新。
神坑的360安全路由DNS代理
背景:在实验室用网络,发现手机上用DNS66设置的DNS服务器地址如同不起作用一样,Google死活上不去,挂shadowsocks却能上。
Tag: Grad
在北京的第二个学期
面见了导师,算是报道。
导师对没人来研究MIMO很是遗憾的样子,并且补充道,申请的MIMO相关的国家自然科学基金连续2年没获批(2015、2017)。
通往真相的枝葉
“科研要耐得住寂寞”,我认为这句话的提法有问题。首先,如果让你研究你不感兴趣的事情,那当然是痛苦万分、寂寞难耐了;在兴趣的驱使下,无论多么艰深的材料,你都会义无反顾得啃下去。
水土不服的第一周研究生生活……
终于摆脱了“周围的人都在打游戏”的生活。
结果呢!我却忽然不习惯起来了,看着室友天天在实验室忙活(虽然不知道他们忙什么),我却几乎天天在宿舍待着,仿佛我就是最菜的那个。
Tag: Nano
GNU nano basics| nano编辑器的使用提示
命令行选项
-m 此选项可激活鼠标,按住shift建即可选择文本。对应nanorc的set mouse
-l 显示行号。对应nanorc的set linenumbers
-E或--tabstospaces 把已有文件中的tab转换为空格。对应nanorc的set tabstospaces
-i或--autoindent 启动自动缩进。对应nanorc的set autoindent
-A或--smarthome启动智能home键。对应nanorc的set smarthome
-$或--softwrap 开启自动折行。对应nanorc的set softwrap
Tag: Cmd
找回Windows 10右键菜单的“在此打开命令窗口”
在Windows 7以及以前的Windows系统上,我们基本上都是手动往注册表里添加键值实现这一目的的。
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd HKEY_CLASSES_ROOT\Directory\shell\cmd
Windows上通过pip安装Python软件包遭遇“UnicodeDecodeError”的解决
简而言之,如果你通过Windows自带的命令提示符(cmd)启动了pip,并且看到了类似下面的错误提示
in console_to_strreturn s.decode(sys.__stdout__.encoding)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte
多半是因为命令提示符当前使用的代码页不是UTF-8。使用命令chcp,将当前代码页切换成UTF-8即可解决:
Tag: Windows
找回Windows 10右键菜单的“在此打开命令窗口”
在Windows 7以及以前的Windows系统上,我们基本上都是手动往注册表里添加键值实现这一目的的。
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd HKEY_CLASSES_ROOT\Directory\shell\cmd
Tag: Dns
Tag: Ipv6
Linux主机获取校园网的ipv6地址……
这个是迷一样——我在Windows 10上,我的Android手机上,都能获取到global IPv6地址,可是一到我的Fedora Linux就只能获取到fe开头的非global地址……
Tag: Sysctl
Linux主机获取校园网的ipv6地址……
这个是迷一样——我在Windows 10上,我的Android手机上,都能获取到global IPv6地址,可是一到我的Fedora Linux就只能获取到fe开头的非global地址……
Tag: Pip
Windows上通过pip安装Python软件包遭遇“UnicodeDecodeError”的解决
简而言之,如果你通过Windows自带的命令提示符(cmd)启动了pip,并且看到了类似下面的错误提示
in console_to_strreturn s.decode(sys.__stdout__.encoding)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte
多半是因为命令提示符当前使用的代码页不是UTF-8。使用命令chcp,将当前代码页切换成UTF-8即可解决:
Tag: Utf-8
Windows上通过pip安装Python软件包遭遇“UnicodeDecodeError”的解决
简而言之,如果你通过Windows自带的命令提示符(cmd)启动了pip,并且看到了类似下面的错误提示
in console_to_strreturn s.decode(sys.__stdout__.encoding)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 33: invalid start byte
多半是因为命令提示符当前使用的代码页不是UTF-8。使用命令chcp,将当前代码页切换成UTF-8即可解决:
Tag: Curl
Tag: Dr.com
Tag: OpenWRT
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。
Tag: Port Fowarding
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
Tag: Proxy
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
ssh connect through sock5 proxy
This post provides a straightforward method to connect your ssh client through a local socks5 proxy.
It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:
ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name
If you are not using nmap’s netcat utility, you may try:
ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name
Tag: Socat
Port forwarding (or proxying) on OpenWRT with socat
在校园网环境中可能会有这种需求:我可以获取到公网IPv6而不能获取到公网IPv4,但是我的应用程序只支持IPv4(比如某些游戏),能否把到达我的公网IPv6的数据转发到内网IPv4(forward IPv6 to IPv4)?
Tag: Lighttpd
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
Tag: V2ray
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
将v2ray、shadowsocks等设置为局域网中的代理服务器
使用代理服务器上网的时候,不知道大家有没有这样一个困惑:如果整个局域网都需要走代理,能不能只设置某一台机器(设为机器A)连接外网,其他机器连接那台能走外网的机器A呢?
Tag: 科学
用Lighttpd转发V2Ray的WebSocket连接
在开始阅读之前,你可能会对“用Nginx转发V2Ray的WebSocket连接”感兴趣,所以我先把这个链接附在这里:
https://oing9179.github.io/blog/2017/03/v2ray-as-WebSocket-Proxy-behind-Nginx/
将v2ray、shadowsocks等设置为局域网中的代理服务器
使用代理服务器上网的时候,不知道大家有没有这样一个困惑:如果整个局域网都需要走代理,能不能只设置某一台机器(设为机器A)连接外网,其他机器连接那台能走外网的机器A呢?
Tag: Fedora
Replacing blueman with blueberry in Fedora 26 Xfce
Maybe the graphical bluetooth management tool blueman is either too complicated or buggy. Anyway, I don’t like it.
Tag: Touhou
Tag: HC5661
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。
Tag: HiWifi
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。
Tag: 极路由
老版极路由1s(HC 5661)刷入OpenWRT记录
(UPDATE Mar-17, 2017) 本文的内容适用于OpenWrt DD分支。但对于最近版本的LEDE(LEDE Reboot 17.01.4)事实上也基本适用。
先贴介绍链接
OpenWRT/LEDE
(旧的)OpenWRT DD
极路由 极1s(老版) HC5661 刷入OpenWRT Barrier Breaker 14.07 手记
本文提到的github仓库看起来很久没更新了,许多问题也没有修复,因此**不建议**刷入那个仓库的固件。关于刷入最新版OpenWRT的问题可以看我的这篇文章。
Tag: Boot
关于创建U盘启动盘的一点思考 | Some considerations when creating bootable flash disks
分区表
U盘在出厂时多半会使用MS-DOS格式的分区表,而不是现代硬盘中常见的GPT。我猜可能是因为需要考虑到兼容性?
分区和文件系统
如果你只用Linux,那么你尽管分区,理论上现代的Linux发行版都能将你U盘上的分区识别出来,无论是通过图形用户界面的自动识别还是通过lsblk然后用mount命令挂载。
但是,如果你还用Windows,并且你希望你创建的可启动U盘同时也能正常地当作一个大容量存储器,分区的时候最好注意以下几点:
- 分区表采用MS-DOS格式;
- 作为普通U盘那样存储数据部分的分区,必须是第一个分区,而且必须是主分区;
- 作为数据存储的这个分区应该使用Windows原生支持的文件系统,而且最好是U盘出厂时使用的文件系统(对于32G以内的U盘,一般来说是FAT32);
- 作为可引导的分区,也就是存放U盘操作系统的分区,应该被设为可启动分区。
Tag: Flash Disk
关于创建U盘启动盘的一点思考 | Some considerations when creating bootable flash disks
分区表
U盘在出厂时多半会使用MS-DOS格式的分区表,而不是现代硬盘中常见的GPT。我猜可能是因为需要考虑到兼容性?
分区和文件系统
如果你只用Linux,那么你尽管分区,理论上现代的Linux发行版都能将你U盘上的分区识别出来,无论是通过图形用户界面的自动识别还是通过lsblk然后用mount命令挂载。
但是,如果你还用Windows,并且你希望你创建的可启动U盘同时也能正常地当作一个大容量存储器,分区的时候最好注意以下几点:
- 分区表采用MS-DOS格式;
- 作为普通U盘那样存储数据部分的分区,必须是第一个分区,而且必须是主分区;
- 作为数据存储的这个分区应该使用Windows原生支持的文件系统,而且最好是U盘出厂时使用的文件系统(对于32G以内的U盘,一般来说是FAT32);
- 作为可引导的分区,也就是存放U盘操作系统的分区,应该被设为可启动分区。
Tag: Socks5
ssh connect through sock5 proxy
This post provides a straightforward method to connect your ssh client through a local socks5 proxy.
It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:
ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name
If you are not using nmap’s netcat utility, you may try:
ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name
Tag: Ssh
ssh connect through sock5 proxy
This post provides a straightforward method to connect your ssh client through a local socks5 proxy.
It’s quite simple, if you have a socks5 server listening on your local port, say, 8888:
ssh -l login -p ssh_server_port -o ProxyCommand='nc --proxy-type socks5 --proxy 127.0.0.1:8888 %h %p' ssh_server_host_name
If you are not using nmap’s netcat utility, you may try:
ssh -l login -p ssh_server_port -o ProxyCommand='nc -X 5 -x 127.0.0.1:8888 %h %p' ssh_server_host_name
Tag: Shadowsocks
将v2ray、shadowsocks等设置为局域网中的代理服务器
使用代理服务器上网的时候,不知道大家有没有这样一个困惑:如果整个局域网都需要走代理,能不能只设置某一台机器(设为机器A)连接外网,其他机器连接那台能走外网的机器A呢?
Tag: Grub2
Tag: Theme
Tag: Blueberry
Replacing blueman with blueberry in Fedora 26 Xfce
Maybe the graphical bluetooth management tool blueman is either too complicated or buggy. Anyway, I don’t like it.
Tag: Blueman
Replacing blueman with blueberry in Fedora 26 Xfce
Maybe the graphical bluetooth management tool blueman is either too complicated or buggy. Anyway, I don’t like it.
Tag: Bluetooth
Replacing blueman with blueberry in Fedora 26 Xfce
Maybe the graphical bluetooth management tool blueman is either too complicated or buggy. Anyway, I don’t like it.
Tag: Gsl
在Visual Studio中使用GNU Scientific Library (GSL)
发现一个github仓库实现了这个事情: GNU Scientific Library with CMake build support。
Tag: Shadowsocks-Rss
Shadowsocks-rss wiki rescue
These pages are pulled from Google Web cache. Unfortunately these are not everything of the original wiki. If you have the other parts of the wiki that are missing here, don’t hesitate to comment below!
Tag: Arduino
Libraries make easy
Were it not for the exsiting librarys (LiquidCrystal and NewPing), I would spend one more day porting my MCS-51 code on LCD1602 and HY-SR05 to Arduino!
Arduino Timer/Counter
There is no function in Arduino’s library to manipulate the Timer/Counter directly. After some searching on the Internet and reading the datasheet of ATmega 328/P I got some ideas on how to code in arduino’s IDE to talk to the timers.
Tag: Timer
Arduino Timer/Counter
There is no function in Arduino’s library to manipulate the Timer/Counter directly. After some searching on the Internet and reading the datasheet of ATmega 328/P I got some ideas on how to code in arduino’s IDE to talk to the timers.
Tag: Tricks
通过直接执行注销代码注销Dr.com的登陆
之所以有这个想法是因为安卓手机上的WebKit似乎不能正常执行注销按钮的javascript响应函数wc()。或者说,点那个注销按钮根本没反应。
