- Stack Overflow访问太慢? Firefox安装Decentraleyes插件,chrome安装LocalCND https://www.zhihu.com/question/22909851 只要你敢想,百度下,必应下很多问题都能解决。
- firefox plugin和Extension还有Add-One的区别
plugin:针对所有浏览器,Extension只针对某个应用 https://stackoverflow.com/questions/33462500/exact-difference-between-add-ons-plugins-and-extensions - [powershell] windows下cmd和powershell还是有些不同的:
比如echo一个变量,cmd是%var%,ps是$var,${var},$"var"
,这样,在Jenkins下使用Windows Batch Command时 输出JOB_NAME时也是%JOB_NAME%。 - sudo -i; passwd 普通用户可以改root的密码了!https://www.zhihu.com/question/51746286?from=profile_question_card
- [firefox] 字体太小? layout.css.devPixelsPerPx
- [python] 2.6 以后内置了json工具, import json.tool
- ubuntu ctrl + alt + a截屏? 设置–键盘–快捷键–自定义快捷键 + gnome-screenshot -a ,“禁用/disable”处按 你想的快捷键 refer to https://blog.youkuaiyun.com/qq_38880380/article/details/78233687
- [Ubuntu] update-alternatives,自己安装完的不是通过包管理器安装的软件,设置(解压得到的可执行文件如java)
- [Xshell] vim中数字小键盘输入是特殊符号而非数字:属性–>初始数字键盘–>“设置为普通”,重启Xshell,参考自:https://jingyan.baidu.com/article/e9fb46e154665e7521f76696.html;
- [Ubuntu] [python] 如何替换Ubuntu系统自带的Python是个问题,比如在16.04下自带的是Python2.7.12 和Python3.5.2,此时想要安装Python3.6, 呵,我直接
sudo apt-get purge pyhton3.5
,结果完了后firefox、和桌面都没了,其他可能的问题还没遇到,进入可视化桌面提示“could not apply the stored configuration for monitors
”,参考博客,cd ~
后删除.config/monitor.xml
后startx
依然不行。 https://blog.youkuaiyun.com/Gpwner/article/details/53780101, 最后 install gnome好了! Ubuntu安装Python3.6和对应的pip3.6 https://blog.youkuaiyun.com/gzh8579/article/details/79530144:
sudo add-apt-repository ppa:jonathonf/python-3.6
安装pip3.6:curl https://bootstrap.pypa.io/get-pip.py | sudo python3.6
根据描述,只是装了一个补丁,看起来是Python3.6
完了之后需要修改alternatives
sudo apt-get update
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
然后敲命令可能遇到 ModuleNotFoundError: No module named ‘gdbm’
sudo apt-get install python3.6-gdbm
http://sourcedigit.com/22413-install-python-3-6-1-on-ubuntu/;
然后,如下图 感觉还是乱乱的。Ubuntu安装Python: 中的旧文件最好也删掉。
15.[pip] pip install 安装不成功: Fatal error in launcher: Unable to create process using ‘"’,使用python -m pip install xxx=xxx 更多的原因是:https://stackoverflow.com/questions/24627525/fatal-error-in-launcher-unable-to-create-process-using-c-program-files-x86;
而我,就不一样了,因为我擅自将虚拟环境目录名fts3改为fts_env3,没想到pip里硬编码了路径:
-
[windows]
关闭windows服务的通用方法
https://computerstepbystep.com/software_protection_service.html -
[IDEA] Idea的Console缓冲区太小?旧的输出就会被冲刷,File–>Settings 搜索console
-
[IDEA] IDEA提示Java5.0 xxx
source改为7、8 [apt] Ubuntu apt不能安装
E:无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系
出现原因:1.软件安装过程中强制中断,而后改变了源 2.软件和更新中的源和apt-get中的源相互独立?
解决办法:恢复原本的源,在软件更新中勾选所有的选项,静待更新完成,最好不要中途中止。 -
[Xshell] xshell中alt按键会呼出xshell的菜单栏而不是发送给xshell 会话属性设置-键盘-alt作为meta键 BackSpace不管用?选择ASCII127, alt+BackSpace是个什么东东呢?
或者使用altHotKey拦截alt键
https://superuser.com/questions/309005/disable-the-activation-of-the-menu-bar-when-alt-is-pressed-in-windows-7 -
[termux]
man
提示语言$LANG
,$LC_*
变量没有设置 https://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
可以看第二个回答下的评论:在/etc/default/locale文件中添加 `LC_ALL=en_US.UTF-8 -
[pycharm] pycharm console输入时,连续input赋值时,一个输入效果却是回车两次;在运行的配置那里关闭console模拟。
-
[IDEA] maven项目的pom中出现红色报错,在settings中搜索maven看你的settings文件写得对不对,大多时候是对,或者使用默认的安装位置的settings.xml。还有一种可能是idea打不开磁盘cache的造成的,选择file–>invalidte caches/restart 参考自SFO:https://stackoverflow.com/questions/41781939/failed-to-maintain-projects-lru-cache-for-dir
-
python安装时说需要VC++ 14自己编译,不妨下载编译好的whl:https://www.lfd.uci.edu/~gohlke/pythonlibs/
-
[IDEA] 正则替换时使用域 () --> $
-
[Maven] 去除不需要的依赖:
mvn dependency:analyze -DignoreNonCompile
-
**[Linux]**翻译词典linux下安装翻译词典 1).需要安装
dict
这里没有中文词典 https://askubuntu.com/questions/191125/is-there-an-offline-command-line-dictionary 朗文中英互译词典:简书:https://www.jianshu.com/p/661c8e5bed86 2).v2ex上网友的在线牛津字典
https://github.com/xueyuanl/cambrinary -
[systemctl] systemctl启动的服务怎么设置环境变量?
- 不管什么程序的启动应该都是依赖脚本后者二进制的,所以必定可以找到一个源头。
systemctl
启动的服务的的脚本就可以在/etc/systemd/system, /run/systemd/system, /usr/local/lib/systemd/system, and /usr/lib/systemd/system
等找到 systemd
和service
的关系,systemD and systemInit,前者是新的;- 给服务添加环境变量的方法:
systemctl <serviceName> edit
, https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service 将打开一个空文件,写入如下内容: -
[Service] Environment="key1=Value1" Environment="key2=Value2"
- 不管什么程序的启动应该都是依赖脚本后者二进制的,所以必定可以找到一个源头。
-
[axel] ubuntu下安装的axel版本太低导致下载’https’链接时Too Many Rediction,比如下载github上的代码时,因为直接访问目的链接返回302,新版本的axel修复了这个问题:
wget -O axel-2.16.1.tar.gz https://file.idait.cn/axel-2.16.1.tar.gz
(这好像是别人的博客) 下载源码自己编译时又提示没有openssl库,如下安装sudo apt-get install libssl-dev
和pkg-config
,然后sudo bash -c './configure && make && make install'
-
[Windows] 禁止win8.1在你正在使用电脑的过程中强制更新,管理员运行powershell,输入
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /
,这个我添加了还没试验过,来自链接,HKLM 即HKEY_LOCAL_MACHINE -
[PDF] 合并pdf
import os
from PyPDF2 import PdfFileReader, PdfFileWriter
def merge(src=tuple, dest=str):
for file in src:
if not os.path.isfile(file):
print("{} is not a file".format(file))
exit(1)
all_pages = PdfFileWriter()
for path in src:
file = PdfFileReader(open(path, 'rb'))
pages = file.getNumPages()
print('{} 有 {} 页'.format(path, pages))
for page in range(pages):
all_pages.addPage(file.getPage(page))
with open(dest, 'wb+') as out:
all_pages.write(out)
print('合并完成')
if __name__ == '__main__':
源文件名们 = ('pdf1.pdf', 'pdf2.pdf')
目的文件名 = ''
if not 源文件名们 or not 目的文件名:
print('确认输入文件名')
目的文件 = '合并-{}.pdf'.format(目的文件名)
merge(源文件名们, 目的文件)
- [iptables] iptables https://linuxx.info/how-to-close-port-iptables/,IP伪造MASQ/Masquerade
- [Firefox] Ubuntu版Firefox不能使用H5视频播放器:
sudo apt install ubuntu-restricted-extras
http://os.ctocio.com.cn/os/2020/0220/8793.html
ubuntu-restricted-extras 是一个包含各种基本软件,如 Flash 插件、unrar、gstreamer、mp4、Ubuntu 中的 Chromium 浏览器的编解码器等的软件包。
由于这些软件不是开源软件,并且其中一些涉及软件专利,因此 Ubuntu 默认情况下不会安装它们。你必须使用 multiverse 仓库,它是 Ubuntu 专门为用户提供非开源软件而创建的仓库。
- [WIFI] Ubuntu桌面版WIFI相关重启:
sudo systemctl restart NetworkManager
iwconfig
ifconfig wlp3s0
sudo iwlist wlp3s0 rate
参考一个博客:https://www.linuxbabe.com/command-line/ubuntu-server-16-04-wifi-wpa-supplicant - [知乎] 网页禁用知乎登录,问题根本是找哪个js在改网页,于是stackoverflow一番:find-javascript-that-is-changing-dom-element 可以用chrome的开发者模式打断点来发现:F12 -> Elements -> 在head上右键-> break On 选择 subtree modifications 和 attribute modifications,这不,找到了它:https://static.zhihu.com/heifetz/column.app.99fef2314a92507445ef.js
- [网络分享] 电脑VPN网络如何分享?连接VPN后一般会多一个虚拟网络适配器,电脑开热点然后将VPN分享给WIFI的虚拟网卡即可,如果你用的是clash,则让clash安装TAP虚拟网卡,也一样分享即可,我想这个应该可以开发一个软件,但是没人开发。或者通过防火墙、forcebindip软件(https://r1ch.net/projects/forcebindip)强制某个程序使用绑定到某网卡进行网络通信:网卡上右键-属性-共享
- 歌单下载 用个叫歌词适配的软件,导入网易云歌单,然后下载歌单,再把歌曲传入网易云盘,然后回去看歌单有哪些歌还没有,在https://huan-xi.github.io/搜索下载,再上传云盘,个别歌还可能匹配不上,作罢。最后把所有歌曲打包压缩上传至云。
- Vmware桥接没有网? 默认桥接的是以太网,但是我用的是WIFI,在WIFI
勾选“VMware Bridge Protocol”即可 - **[VSCode]**下正则选用,在输入正则后的那个框里同时按下
Alt+Enter
即选中了所有匹配行 https://www.zhihu.com/question/295447824
也可以用负匹配将其他替换为空的。
去重:命令工具中搜索 lines - FireFox 访问IPv6地址的示例
http://[2606:4700::6812:791:443]
- Excel 某一列的特殊颜色求和 https://blog.youkuaiyun.com/u010472307/article/details/105708883
定义函数
Function sumcolor(rng1 As Range, rng2 As Range) As Single
Dim cell As Range
sumcolor = 0
For Each cell In rng1
If cell.font.Color = rng2.font.Color Then sumcolor = sumcolor + cell.value
Next cell
End Function
- 清除DNS缓存 firefox
about:networking
选DNS Chromechrome://net-internals/#dns
EDGEedge://net-internals/#dns
其他的参见 mobilestalk.net/how-to-clear-dns-cache-in-chrome-edge-safari-firefox-and-opera - FireFox 网络统计
about:networking#rcwn
- FireFox 多用户配置 about:config 启动多用户程序
firefox.exe -p
官方文档 - 临时Python HTTP Server https://pastebin.com/raw/rw4Z4NBz 源自github
- Windows 休眠模式启用 管理员执行
powercfg -h on
- IDEA 新引入一个maven工程,提示不支持lambda,并且只支持jdk5,这个玩意就这么笨吗?你都不知道要在几个第三方设置jdk的版本,什么SDK、Module,甚至还有java compile那里设置,我真是服了,今天试了下pom中增加这个东西可以
-
<project> ... <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> ... </project>
-
- 浏览器插件 google验证码替换 gooreplacer
- Outlook 按照主题分组然后按照时间排序显示邮件的方法:按日期 显示为对话
- VsCode 可用变量 https://code.visualstudio.com/docs/editor/variables-reference
- visudo visudo
NOPASSWD
不起作用,要把配置放在最后一行jimmy ALL=(ALL) NOPASSWD:ALL
查看生效规则:sudo -l -U jimmy
- Firefox 把请求转换成cURL请求,F12右键那个网络请求,然后点复制就能看到.