2020年12月20日 星期日

Nvidia顯示卡驅動安裝

打開終端機,輸入sudo visudo

將%sudo這一行最右邊的ALL改成NOPASSWD: ALL

進入終端輸入兩條命令

[email protected]:~$ ubuntu-drivers devices
sudo ubuntu-drivers autoinstall

解釋一下:第一條命令是檢視顯示卡裝置和顯示卡驅動,第二條命令是自動安裝合適顯示卡驅動

第三步:重新啟動吧,然後在應用中找到nvidia setting,如果出現這樣的介面,就說明Nvidia顯示卡驅動安裝成功

在Ubuntu 18.04上安装XAMPP

$ sudo '/home/stephen/Downloads/xampp-linux-x64-7.4.12-0-installer.run'

要修正大部份的系統安全弱點,只要執行下面的指令:

sudo /opt/lampp/lampp security

移除XAMPPsudo rm -rf /opt/lampp

libgcc_s.so.1 must be installed for pthread_cancel to work

sudo apt install libgcc1-dbg

axel  -a {URL} 

Laravel Homestead的安装和使用

https://blog.csdn.net/woqianduo/article/details/81091154


解决冲突#
在 《Laravel 入门教程》 一书的环境搭建中,我们使用了 homestead.box v0.6.0 版本,但是没有对 Homestead 管理脚本 进行版本限制,所以读者会遇到上面的版本冲突问题。

解决方案,就是:

备份你的 .homestead/Homestead.yaml 文件;
命令行切到 Homestead 文件夹下,执行命令 git checkout tags/v3.1.0 -b v3.1.0 检出 「Homestead 管理脚本」的 v3.10 版本;
命令行在 Homestead 文件夹下,执行命令 bash init.sh ;
把第一步备份的 .homestead/Homestead.yaml 文件重新覆盖;
命令行切到 Homestead 文件夹下,执行命令 vagrant provision ;
重启 盒子,vagrant halt, 然后 vagrant up;

The files rtl8125a-3.fw and rtl8168fp-3.fw can be found on:

wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_nic/rtl8168fp-3.fw

wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_nic/rtl8125a-3.fw

Then run the commands :

sudo cp *.fw /lib/firmware/rtl_nic/
sudo update-initramfs -u

在 macOS 上安裝 PHP 7.4

https://blog.epoch.tw/2020/04/21/%E5%9C%A8-macOS-%E4%B8%8A%E5%AE%89%E8%A3%9D-PHP-7-4/

使用 Homebrew 在 MacOS Mojave 安裝 Mysql

https://myapollo.com.tw/zh-tw/polly-install-mysql-using-homebrew/

MAC如何安裝Composer

https://ithelp.ithome.com.tw/articles/10203021

2018年12月30日 星期日

For Evan



// npm config set package-lock false
npm install --save -g core-js@^3
npm install npm@latest -g
更改vetur配置 vscode->首选项->设置->搜索(vetur)
"vetur.validation.template": true,
改成:false
①配置淘宝镜像 :
npm config set registry https://registry.npm.taobao.org
  • 1
②重新安装vue-cli,即可成功
npm install -g @vue/cli

使用F5键启动项目之后不能热重载需要添加配置:在launch.json添加属性:
"args": ["--enable-software-rendering", "-d", "all"]

To disable DevTools:
Open VS Code settings and search for Dart: Open Dev Tools and set it to never(Removing "dart.openDevTools": "flutter" from settings.json should work too)

The issues have to do with the specific device you're trying to emulate and the processor you have (intel core 2 or older)
To solve it:
  1. Create a new emulator
  2. Select the device you would like to emulate.
  3. On the next page with the header "System Image" select the tab "other images"
  4. Download and select an image that is listed as armeabi-v7a under the ABI column.

That image should run successfully with your processor.
在Ubuntu 18.04 LTS及更高版本上安装GNOME Classic模式
只需安装一个软件包,即可快速轻松地在Ubuntu 18.04 LTS(及更高版本)上安装GNOME Classic模式会话,你可以避免在网上其他地方建议的gnome-vanilla-desktop软件包,因为引用Spice Girls。
弹出一个新的终端窗口(ctrl+t)并运行以下命令:
sudo apt install gnome-shell-extensions
安装会很快,之后你可以注销当前会话,并在登录屏幕上单击cog图标以选择“GNOME Classic”会话,然后登陆进入系统桌面:

如何在Ubuntu英文介面下使用中文倉頡速成輸入法


Ubuntu 已經預裝一套叫 vino 的VNC Server 了! 照以下設定就可以 VNC 直接使用 Ubuntu 輸出到硬體螢幕的畫面了。

啟動 gnome 視窗環境的 vino。DISPLAY=:0是預設輸出螢幕,若是在實機上直接操作可省略
此參數,但像我透過SSH設定就要加,不然會出現ERROR,若有接其他螢幕就1,2,3...類推
$ DISPLAY=:0 gsettings set org.gnome.Vino enabled true

這項可以不要,如果跟我一樣懶得設定透過SSH Tunnel連線就把加密連線關掉
$ DISPLAY=:0 gsettings set org.gnome.Vino require-encryption false

VNC Server啟動!
$ DISPLAY=:0 /usr/lib/vino/vino-server

可以開始使用習慣的 VNC Client 遠端操作了!

在Ubuntu 18.04系统中启用SSH登录的方法
https://ywnz.com/linuxjc/2347.html

How to install Node.js on Ubuntu 16.04/18.04 using NVM (Node Version Manager)


漢宗免費中文字型(只要中明體-wp010-05, 中楷體-wp010-08)


下載免費的SanDisk修復工具和SanDisk格式化軟體           

將硬碟直接備份到另外一顆硬碟

https://wiki.ubuntu-tw.org/index.php?title=Dd

https://udn.com/news/story/7088/3850642

WinToUSB可以讓你輕鬆將Windows 10裝入USB裝置變成行動系統

http://walker-a.com/archives/3650


Check YouTube Video Restrictions Online

https://unblockvideos.com/youtube-video-restriction-checker/

Python Tutorial for Programmers - Python Crash Course

https://www.youtube.com/watch?v=f79MRyMsjrQ

CutePDF Writer

https://chrome.google.com/webstore/detail/douga-getter/hhbcihapcmaemjinlbgafnjjihbdmjnf

如何在Ubuntu英文介面下使用中文倉頡速成輸入法

https://medium.com/hong-kong-linux-user-group/%E5%A6%82%E4%BD%95%E5%9C%A8ubuntu%E8%8B%B1%E6%96%87%E4%BB%8B%E9%9D%A2%E4%B8%8B%E4%BD%BF%E7%94%A8%E4%B8%AD%E6%96%87%E5%80%89%E9%A0%A1%E9%80%9F%E6%88%90%E8%BC%B8%E5%85%A5%E6%B3%95-24d0f4bcf479

在Ubuntu 16.04上安装Gnome经典桌面
sudo apt-get install gnome-session-flashback

使用命令行的方式从桌面移除回收站图标

如果你倾向于使用命令行,你可以在终端里面使用下面的命令来从Ubuntu的桌面上移除回收站图标。
gsettings set org.gnome.nautilus.desktop trash-icon-visible false
如果你希望把它加回来,简单的将上述命令中的false改成true即可。
gsettings set org.gnome.nautilus.desktop trash-icon-visible true

gnome-session-quit

檢查 win10 啟用狀態 slmgr.vbs -xpr

mysql數據庫的安裝

https://www.twblogs.net/a/5c737467bd9eee31cea4c282


Win10環境下Redis和Redis desktop manager 安裝

https://www.itread01.com/content/1542420973.html

安装chrome、chromedriver:

chromedriver下载解压后有个chromedriver.exe文件,要复制到chrome安装目录、Anaconda3\Scripts目录下。

// Charles 4.2目前是最新版,可用。
Registered Name: https://zhile.io

License Key: 48891cf209c6d32bf4

pyspider 启动错误
https://segmentfault.com/q/1010000015429020

python -m pip install wsgidav==2.4.1 --user


 tar -zxvf pycurl-7.43.0.2.tar.gz
python setup.py install --curl-config=/usr/local/bin/curl-config


如何在Ubuntu 16.04上安装Python 3.6的pip

python3        3.5 3.6 change

sudo apt-get install python python-pip python3 python3-pip
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
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
然后
$ pip -V
pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
$ pip3 -V
pip 8.1.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)
python3 -V
pip3 -V
然后选择python 3.6 run
sudo update-alternatives --config python3
然后选择“2”。然后
$ pip3 -V
pip 8.1.1 from /usr/local/lib/python3.6/dist-packages (python 3.6)
要更新pip,请选择所需的版本和
pip3 install --upgrade pip

$ pip3 -V
pip 9.0.1 from /usr/local/lib/python3.6/dist-packages (python 3.6)
python 2.7 3.5 3.6 change
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 3
sudo update-alternatives --config python
python -V
pip -V

Python34 ImportError:Dll load failed:找不到指定模块?

先安装Visual C++ Redistributable for Visual Studio 2015

Ubuntu 16.04 安装 MongoDB
http://blog.topspeedsnail.com/archives/4820

ubuntu 16.04 安裝 tesserocr及 pillow 需使用 python 3.5 環境

https://testerhome.com/topics/16305


https://github.com/tesseract-ocr/tesseract/wiki/Compiling#macos

https://github.com/tesseract-ocr/tessdata

使用conda install -c simonflueckiger tesserocr命令

pip3 install --no-cache-dir tesserocr --user

測試下載     https://raw.githubusercontent.com/Python3WebSpider/TestTess/master/image.png


影片下載
javascript:window.location ='http://k8aa.com/jx/index.php?url='+window.location.href

VS Code 與 cmder 整合 (windows)

步驟如下






















1.  開啟 VS Code,然後按 `Ctr`l +  `,`
2.  搜尋 settings.json
3.  點擊 "在 settings.json 內編輯",會開啟settings.json 的 頁籤
4.  增加或修改以下內容,其中 CMDER_ROOT 是 windows 的 環境變數,要先設定為 cmder 的安裝目錄

    "terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.env.windows": {"CMDER_ROOT": "[cmder_root]"},
    "terminal.integrated.shellArgs.windows": [
        "/k", "[cmder_root]\\vendor\\init.bat"
    ]

5.  重啟VS Code 
PS.將[cmder_root]換成cmder的目錄C:\\Users\\stephen\\Anaconda3

修改命令提示符号

cmder默认的命令提示符是 λ ,如果想改成常见的 $ ,具体操作如下:
bash的情况下
.\vendor\clink.lua文件中local lambda = "λ"改为local lambda = "$",然后在.\vendor\git-for-windows\etc\profile.d\git-prompt.sh文件中,把PS1="$PS1"'λ ' # prompt: always λ 改为PS1="$PS1"'$ ' # prompt: always λ ,然后重启cmder即可 。
PowerShell的情况下
.\vendor\profile.ps1文件中 Microsoft.PowerShell.UtilityWrite-Host "nλ " -NoNewLine -ForegroundColor "DarkGray"** 改为 **Microsoft.PowerShell.Utility\Write-Host "n$ " -NoNewLine -ForegroundColor "DarkGray" ,然后重启cmder即可。
Win7命令提示符 已被系統管理員停用
https://kknews.cc/zh-tw/tech/a82go36.html
https://kknews.cc/zh-tw/tech/y8mov4a.html


chrome_options=Options()
#设置chrome浏览器无界面模式
chrome_options.add_argument('--headless')
browser = webdriver.Chrome(options=chrome_options)