It's simple and convenient.
[command]
pip install opencv_python
2017/12/14
2017/12/13
How to solve MSI GS60 2PE Ghost Pro Bluetooth issue [win10]
Don't use Windows 10 built-in driver!
For the reason that Bluetooth devices would be disconnected while Wi-Fi getting busy.
It's recommended to install Intel official drivers for "Intel® Dual Band Wireless-AC 7260".
Please install both of Wi-Fi and Bluetooth drivers.
[Link]
https://www.intel.com/content/www/us/en/support/articles/000005559/network-and-i-o/wireless-networking.html
For the reason that Bluetooth devices would be disconnected while Wi-Fi getting busy.
It's recommended to install Intel official drivers for "Intel® Dual Band Wireless-AC 7260".
Please install both of Wi-Fi and Bluetooth drivers.
[Link]
https://www.intel.com/content/www/us/en/support/articles/000005559/network-and-i-o/wireless-networking.html
2017/10/11
Free DVD to MP4 converter
It's a freeware with simple and friendly UI.
[Link]
https://www.videohelp.com/software/VidCoder
[Link]
https://www.videohelp.com/software/VidCoder
2017/05/19
截然不同
每天搭乘區間車通勤,總是能觀察許多人事物,今天看見二對母女不同的互動,產生不同的感 觸。
這二對母女看起來年齡相似,女兒都是學齡前兒童,約5、6歲。
母女A在座位上數三位數數字,似乎是從100數到300,母親說單數,女兒說雙數,過程中母親的眼神一直停留在女兒身上,女兒也感受到母親的關愛,時而躺臥在母親腿上,時而擁入母親懷裡,每到該進位時,例如268算到270,女兒似乎會稍微卡頓,回答不出來,母親只是笑著看她,女兒不久想到答案,也開心地對母親笑。
母女A在座位上數三位數數字,似乎是從100數到300,母親說單數,女兒說雙數,過程中母親的眼神一直停留在女兒身上,女兒也感受到母親的關愛,時而躺臥在母親腿上,時而擁入母親懷裡,每到該進位時,例如268算到270,女兒似乎會稍微卡頓,回答不出來,母親只是笑著看她,女兒不久想到答案,也開心地對母親笑。
而一旁的母女B,坐在背對母女A的座位上,母親眼神專注看著手機,女兒則是轉過身來看著母女A,一臉懵懂又好像若有所思,不久便回過頭來看著母親,母親仍然盯著手機,手指動個不停,女兒趴在母親腿上,像是在撒嬌,似乎希望引起母親的注意,但母親仍然盯著手機,手指動個不停,女兒失望的坐起來,正好列車到浮州站,女兒問母親是不是到站了,母親僅回了一句還沒到,又盯著手機,手指動個不停,女兒站起來趴在窗邊,面無表情地看著滴落在玻璃上的毛毛細雨,就這樣到了南樹林站,女兒坐下來,一手抓住母親的手機,吵著說她也要玩,母親拒絕,要女兒乖乖坐好。女兒默默坐著盯著窗外,臉上沒有笑容。
你必須追尋生命而且擁抱生命,當你如此做了。有時候生命也會回過頭來擁抱你,而這經驗卻是你無法想像的。 - 最後十四堂星期二的課 果陀劇場
2017.05.19
2017/04/14
Impressive theme Paper
It's really impressive theme for Linux Mint.
[command]
sudo add-apt-repository ppa:snwh/pulp
sudo apt-get update
sudo apt-get install paper-icon-theme
sudo apt-get install paper-gtk-theme
sudo apt-get install paper-cursor-theme
[reference]
https://snwh.org/paper
[command]
sudo add-apt-repository ppa:snwh/pulp
sudo apt-get update
sudo apt-get install paper-icon-theme
sudo apt-get install paper-gtk-theme
sudo apt-get install paper-cursor-theme
[reference]
https://snwh.org/paper
Auto mount nfs on Linux/Debian
I am used to running a couple of virtual machines at the same time on my PC and I need to share files with each VMs. Therefore, I utilize nfs to meet my requirement. Notice that it doesn't have much security considering.
Install nfs server:
[command]
sudo apt-get install nfs-kernel-server nfs-common
mkdir /home/hubert/workspace
chmod -R 777 /home/hubert/workspace/
vi /etc/exports
[modify]
/home/hubert/workspace 192.168.56.8(rw,sync,no_root_squash,no_all_squash)
# Please replace 192.168.56.8 with your own client IP address.
save, refresh, and restart nfs
[command]
sudo exportfs -r
sudo /etc/init.d/nfs-kernel-server restart
---------------------------------------------------------------
Configure nfs client:
[command]
sudo apt-get install nfs-commom
mkdir -p /media/hostshare
test it manually, please replace 192.168.56.1 with your own host IP address.
[command]
mount -t nfs 192.168.56.1:/home/hubert/workspace /media/hostshare
auto mount nfs:
[command]
sudo vi /etc/fstab
[modify]
192.168.56.1:/home/hubert/workspace /media/hostshare nfs defaults 0 0
# Please replace 192.168.56.1 with your own host IP address.
save and restart your VM to check it works or not.
Install nfs server:
[command]
sudo apt-get install nfs-kernel-server nfs-common
mkdir /home/hubert/workspace
chmod -R 777 /home/hubert/workspace/
vi /etc/exports
[modify]
/home/hubert/workspace 192.168.56.8(rw,sync,no_root_squash,no_all_squash)
# Please replace 192.168.56.8 with your own client IP address.
save, refresh, and restart nfs
[command]
sudo exportfs -r
sudo /etc/init.d/nfs-kernel-server restart
---------------------------------------------------------------
[command]
sudo apt-get install nfs-commom
mkdir -p /media/hostshare
test it manually, please replace 192.168.56.1 with your own host IP address.
[command]
mount -t nfs 192.168.56.1:/home/hubert/workspace /media/hostshare
auto mount nfs:
[command]
sudo vi /etc/fstab
[modify]
192.168.56.1:/home/hubert/workspace /media/hostshare nfs defaults 0 0
# Please replace 192.168.56.1 with your own host IP address.
save and restart your VM to check it works or not.
Modify network settings under command line on Linux / Debian.
It tells you how to modify network settings under command line on Linux / Debian.
[command]
vi /etc/network/interfaces
[modify]
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.56.100
netmask 255.255.255.0
gateway 192.168.56.1
---------------------------------------------------------------
restart network and apply the settings.
[command]
/etc/init.d/networking restart
[command]
vi /etc/network/interfaces
[modify]
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.56.100
netmask 255.255.255.0
gateway 192.168.56.1
---------------------------------------------------------------
[command]
/etc/init.d/networking restart
Install LINE on Linux Mint 18.1 via wineHQ
It tells you how to install LINE windows version on Linux Mint 18.1.
Install wineHQ
[command]
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install winehq-devel
Install winetricks and run it
[command]
sudo apt-get install winetricks
winetricks
Follow these steps:
1. What do you want to do?
-> Select the default wineprefix -> OK
2. What would you like to do to this wineprefix?
-> Install a Windows DLL or component -> OK
3. Which package(s) would you like to install?
-> vcrun2008 -> OK
4. It might take some time to install few necessary packages.
5. Close winetricks window.
6. Please download the LINE App from the official website https://line.me/ .
7. Click mouse right button on LineInst.exe .
8. select Open with -> Wine Windows Program Loader.
9. Install and run it.
Install wineHQ
[command]
sudo add-apt-repository ppa:wine/wine-builds
sudo apt-get update
sudo apt-get install winehq-devel
Install winetricks and run it
[command]
sudo apt-get install winetricks
winetricks
Follow these steps:
1. What do you want to do?
-> Select the default wineprefix -> OK
2. What would you like to do to this wineprefix?
-> Install a Windows DLL or component -> OK
3. Which package(s) would you like to install?
-> vcrun2008 -> OK
4. It might take some time to install few necessary packages.
5. Close winetricks window.
6. Please download the LINE App from the official website https://line.me/ .
7. Click mouse right button on LineInst.exe .
8. select Open with -> Wine Windows Program Loader.
9. Install and run it.
2017/03/29
HTTrack Debian Packages
HTTrack 砍站軟體 for Linux
Install full GUI version.
[command]
apt-get update
apt-get install webhttrack
Install commandline version only.
[command]
apt-get update
apt-get install httrack
[reference]
http://debian.httrack.com/
Install full GUI version.
[command]
apt-get update
apt-get install webhttrack
Install commandline version only.
[command]
apt-get update
apt-get install httrack
[reference]
http://debian.httrack.com/
Very good Text Editor for Linux -- Notepadqq
It's recommended to install notepadqq on your Linux if you like to use notepad++ on Windows.
[command]
sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get update
sudo apt-get install notepadqq
[command]
sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get update
sudo apt-get install notepadqq
How to change the fonts after install Chinese language package
Before install Boshiamy input method, we must install Trad-Chinese language package first. However, the fonts would be changed to ukai/uming. Therefore, remove them could solve this problem.
[command]
sudo apt-get remove fonts-arphic-ukai
sudo apt-get remove fonts-arphic-uming
[reference]
https://www.ptt.cc/bbs/Linux/M.1408882475.A.A93.html
[command]
sudo apt-get remove fonts-arphic-ukai
sudo apt-get remove fonts-arphic-uming
[reference]
https://www.ptt.cc/bbs/Linux/M.1408882475.A.A93.html
過於冷漠
今天在台北車站第11號車廂位置,往捷運方向的樓梯移動時,人潮眾多所以我低著頭小心翼翼地注視階梯慢慢走,發現右邊男子一直側著臉往我的方向看,便抬頭看他,結果他是直盯著我左邊的女生大腿看,女生穿著超短短裙,露出一雙纖細嫩白的美腿,難怪男子看得目不轉睛直到出了票閘還在看。 女生出了票閘後往左走,男子則是往右走向捷運站的票閘,仍不斷回頭找尋女生的蹤影,男子突然停下腳步視線看向左邊,原來女生從另一個捷運票閘進來,男子伺機跟在她身後搭上電扶梯,而我不以為意從電扶梯左側快速通過,在我排隊的位置正好可以看見電扶梯的情況,女生下電扶梯後往旁邊走幾步便停下排隊,而男子跟在其身後仍死盯著女生雙腿看,上捷運後... 我思考了一下:
剛開始是認為女生穿著過於曝露的服裝,本來就容易吸引色狼靠近,在穿這種衣服前,就要自己承擔風險,所以不予理會。
後來再想想,如果我適時的提醒女生,或許可以讓她有所警覺,但該怎麼做呢? 如何讓女生防範,然後色狼不會日後報復我?
想來想去,得到的結論,就是用手機寫上「小心色狼」的字出示給女生看,然後不要讓男子看到即可。
2017/03/26
監控CPU使用率 script
計算CPU負載的script,將第14行的 ${c...@]}改成 ${CPU[@]} ,存檔後 chmod +x 即可。
[reference]
http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg01690.html
[reference]
http://www.mail-archive.com/linuxkernelnewbies@googlegroups.com/msg01690.html
在Linux Mint 安裝嘸蝦米輸入法 -- Fcitx
Linux Mint 18.1 安裝嘸蝦米輸入法
若非中文語系,務必先安裝Chinese Language Package,並選擇Fcitx為輸入法工具,再至Control Center 內的Fcitx configure將Boshiamy 加進對應的語系(例如: English)。
[command]
sudo apt install fcitx-table-boshiamy
安裝後,建議先登出,再至螢幕右下角小鍵盤(小企鵝)處切換,或開啟輸入法設定視窗檢視即可。 Ctrl + Space Bar 亦可。
若非中文語系,務必先安裝Chinese Language Package,並選擇Fcitx為輸入法工具,再至Control Center 內的Fcitx configure將Boshiamy 加進對應的語系(例如: English)。
[command]
sudo apt install fcitx-table-boshiamy
安裝後,建議先登出,再至螢幕右下角小鍵盤(小企鵝)處切換,或開啟輸入法設定視窗檢視即可。 Ctrl + Space Bar 亦可。
[link]
嘸蝦米輸入法影音教學光碟 (附完整章節清單,可快速跳轉)
2017/03/23
Create cronjob for specific user.
It tells how to create cronjob for specific user.
Please modify /etc/crontab directly if use the user column for cronjob.
*/5 * * * * hubert /path/to/MyRoutineProc.sh
[command]
sudo vi /etc/crontab
---------------------------------------------------------------
Please use -u option to assign cronjob for specific user.
[command]
sudo crontab -u USERNAME -e
[reference]
http://stackoverflow.com/a/30445074
Please modify /etc/crontab directly if use the user column for cronjob.
*/5 * * * * hubert /path/to/MyRoutineProc.sh
[command]
sudo vi /etc/crontab
---------------------------------------------------------------
Please use -u option to assign cronjob for specific user.
[command]
sudo crontab -u USERNAME -e
[reference]
http://stackoverflow.com/a/30445074
Install/setup Apache Web Server
It tells you how to install and setup Apache web server via apt-get utility.
[command]
sudo apt-get install apache2
---------------------------------------------------------------
Disable default site if necessary.
[command]
sudo a2dissite default
sudo a2dissite default-ssl
sudo service apache2 reload
sudo service apache2 restart
---------------------------------------------------------------
[command]
sudo a2ensite hubert.cc
sudo service apache2 reload
sudo service apache2 restart
[command]
sudo apt-get install apache2
---------------------------------------------------------------
[command]
sudo a2dissite default
sudo a2dissite default-ssl
sudo service apache2 reload
sudo service apache2 restart
---------------------------------------------------------------
Enable your website (e.g. hubert.cc).
sudo a2ensite hubert.cc
sudo service apache2 reload
sudo service apache2 restart
Import/Export SQL file under command line
It tells how to import/export SQL file under command line.
Import SQL file.
[command]
mysql -u USERNAME -p DATABASE_NAME < SQL_FILE_NAME
---------------------------------------------------------------
Export SQL file.
[command]
mysqldump -u USERNAME -p DATABASE_NAME > SQL_FILE_NAME
Import SQL file.
[command]
mysql -u USERNAME -p DATABASE_NAME < SQL_FILE_NAME
---------------------------------------------------------------
Export SQL file.
[command]
mysqldump -u USERNAME -p DATABASE_NAME > SQL_FILE_NAME
Install MariaDB on Debian or Linux
It tells how to install MariaDB via apt-get utility.
[command]
sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.1/debian wheezy main'
sudo apt-get update
sudo apt-get install mariadb-server
[reference]
https://downloads.mariadb.org/mariadb/repositories/#mirror=ossplanet&distro=Debian&distro_release=wheezy--wheezy&version=10.1
[command]
sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://ftp.ubuntu-tw.org/mirror/mariadb/repo/10.1/debian wheezy main'
sudo apt-get update
sudo apt-get install mariadb-server
[reference]
https://downloads.mariadb.org/mariadb/repositories/#mirror=ossplanet&distro=Debian&distro_release=wheezy--wheezy&version=10.1
Set permission (hosts.allow / hosts.deny)
It tells how to allow/deny the specific networks to access the services of Debian or Linux.
Modify hosts.allow to add white-list.
[command]
sudo vi /etc/hosts.allow
[modify]
Add the following settings.
# only allow 192.168.56.1 - 254 to access OpenSSH service
sshd: 192.168.56.0/255.255.255.0
---------------------------------------------------------------
Modify hosts.deny to add black-list.
[command]
sudo vi /etc/hosts.deny
[modify]
Add the following settings.
# deny any network to access OpenSSH service
sshd: ALL
Modify hosts.allow to add white-list.
[command]
sudo vi /etc/hosts.allow
[modify]
Add the following settings.
# only allow 192.168.56.1 - 254 to access OpenSSH service
sshd: 192.168.56.0/255.255.255.0
---------------------------------------------------------------
[command]
sudo vi /etc/hosts.deny
[modify]
Add the following settings.
# deny any network to access OpenSSH service
sshd: ALL
Remove useless services
Remove useless services(e.g. avahi, cups) from Debian or Linux if necessary.
[command]
apt-get remove avahi-daemon avahi-utils cups
[reference]
https://bullyvard.wordpress.com/2012/02/05/remove-cups-avahi-daemon-and-apparmor-from-ubuntu/
[command]
apt-get remove avahi-daemon avahi-utils cups
[reference]
https://bullyvard.wordpress.com/2012/02/05/remove-cups-avahi-daemon-and-apparmor-from-ubuntu/
Add a sudo user
It tells you how to add a sudo user.
[command]
sudo adduser hubert
sudo usermod -aG sudo hubert
[command]
sudo adduser hubert
sudo usermod -aG sudo hubert
Install OpenSSH
It tells you how to install OpenSSH via apt-get utility.
[command]
sudo apt-get install openssh-server
Don't forget to deny root login.
[command]
sudo vi /etc/ssh/sshd_config
[modify]
::: Before :::
PermitRootLogin yes
::: After :::
PermitRootLogin no
[command]
sudo apt-get install openssh-server
Don't forget to deny root login.
[command]
sudo vi /etc/ssh/sshd_config
[modify]
::: Before :::
PermitRootLogin yes
::: After :::
PermitRootLogin no
Boot in text mode
It tells you how to by default boot in text mode for Debian or Linux.
[command]
sudo vi /etc/default/grub
[modify]
::: Before :::
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
#GRUB_CMDLINE_LINUX="text"
#GRUB_TERMINAL=console
::: After :::
#GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="text"
GRUB_TERMINAL=console
---------------------------------------------------------------
Update grub to apply the new settings.
[command]
sudo update-grub
Reboot Debian to check result.
[reference]
http://ask.xmodulo.com/boot-into-command-line-ubuntu-debian.html
[command]
sudo vi /etc/default/grub
[modify]
::: Before :::
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
#GRUB_CMDLINE_LINUX="text"
#GRUB_TERMINAL=console
::: After :::
#GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="text"
GRUB_TERMINAL=console
---------------------------------------------------------------
Update grub to apply the new settings.
[command]
sudo update-grub
Reboot Debian to check result.
[reference]
http://ask.xmodulo.com/boot-into-command-line-ubuntu-debian.html
2017/02/20
台南火車站趣事
饑腸轆轆的我,在第一月臺吃著美味的臺鐵便當。第二月臺停著往潮州的南下自強號,鈴聲響起,催促著未上車的旅客加快腳步。此時剪票閘門衝出了一道人影,是個約莫五十來歲的大叔,匆匆忙忙的找了一個壯年男子搭問「請問往斗六的車在哪裡搭車?」,壯年理著平頭臉上紅潤似乎帶著酒氣,頂著中氣十足的嗓音說「第二月臺,那輛自強號就是了」 大叔有些遲疑,又確認了一次「那輛自強號有到斗六嗎?上面寫到潮州捏?」 壯年十分肯定的說「對啦~ 會經過斗六,快發車了,你要趕快走地下道衝過去了。」 大叔向男子道謝後拔腿狂奔,透過車窗清楚看到,大叔趕在最一刻搭上了往潮州的列車,列車緩緩開走消失在遠方,我則愣住看著壯年, 壯年擺著一副像日行一善得意洋洋的跩樣看著我 (*˘︶˘*)
後記:
當壯年男子和我四目相交時,我抬頭示意要他看第一月臺的指示牌,上頭清楚寫著往斗六的北上區間車準點進站,他臉頰的紅潤瞬間擴散到整個頭部,當下我有些擔心他會惱羞成怒,幸好他很快就走掉了 (´・_・`)
當壯年男子和我四目相交時,我抬頭示意要他看第一月臺的指示牌,上頭清楚寫著往斗六的北上區間車準點進站,他臉頰的紅潤瞬間擴散到整個頭部,當下我有些擔心他會惱羞成怒,幸好他很快就走掉了 (´・_・`)
Subscribe to:
Posts (Atom)