2021年5月28日 星期五
power point 調整圖片透明
power point 調整圖片透明
2021年5月27日 星期四
MPV ubuntu 下好用的播放器 video player
舊版本自訂熱鍵
自行compile
直接用第三方repository安裝
Hotkeys
MPV ubuntu 下好用的播放器 video player
2021年5月20日 星期四
[Ubuntu] Silver Searcher , a fast code searching tool
The Silver Searcher
A code searching tool similar to ack, with a focus on speed.
install on ubuntu
sudo apt-get install silversearcher-ag
usage
search i_am_sample_code in /
sudo ag --silent i_am_sample_code /
[Ubuntu] Silver Searcher , a fast code searching tool
2021年5月19日 星期三
Install Bash 5.1 on ubuntu 18.04
sudo apt-get install build-essential
clone the source
https://github.com/bminor/bash
cd to the code directory ./configure make sudo make install sh
完成之後,bash會被放到/usr/local/bin/bash
$ chsh
Install Bash 5.1 on ubuntu 18.04
cherrytree on ubuntu 18.04
cherrytree on ubuntu 18.04
2021年5月8日 星期六
[linux] 用sed將文件中的換行換成空白
#!/bin/bash
# remove $1's single \n and save to $2
sed ':a;N;$!ba;s/\n\{2\}/%@%/g;s/\n/ /g; s/%@%/\n/g' $1 > $2
將上面這段存成 fixNl.sh再用
$fixNl.sh source dest
就會將source中了內容轉換dest了
[linux] 用sed將文件中的換行換成空白
2021年5月6日 星期四
[C++] && rvalue 暫時存在的Object
myClass f() {...};
myClass X,Y;
myClass A(X); // 1.
myClass B(X+Y); // 2.
myClass C(f()); // 3.
//copy constructor
myClass(myClass const& other){}
//move constructor
myClass(myClass&& other){}
[C++] && rvalue 暫時存在的Object
[c++] method()=delete
[c++] method()=delete
2021年5月5日 星期三
[ubuntu] 文件瀏覽器less使用教學
[ubuntu] 文件瀏覽器less使用教學
[ubuntu] bash 搜尋歷史指令
[ubuntu] bash幫指令取縮寫
[ubuntu] bash幫指令取縮寫
ubuntu刪除多個檔案
ubuntu刪除多個檔案
ubuntu建立多個檔案
ubuntu快速建立檔案內容
[ubuntu]不需要sudo權限重開機
[ubuntu]不需要sudo權限重開機
2021年4月26日 星期一
[Raspbian]raspberry pi 中文輸入法
不知為何gcin就是無法在我的8G版本上work
後來改用fcitx就沒問題了..
安裝指令
$ sudo apt-get install fcitx fcitx-chewing
安裝完成後再去
menu > preference > input method 去選fcitx
安裝方式請參考
[Raspbian]raspberry pi 中文輸入法
[Raspbian][ raspberry pi ] dock window 與熱鍵修改
pi 的os 竟然沒辦法dock window...
這樣基本的功能,難道沒人把它當便宜主機用嗎?
因為解決方法有點小麻煩,這邊就紀錄一下
ref: https://pastebin.com/NBkccE7B
使用方法基本上就是用win + q/w/e/a/d/z/x/c 將視窗移到各個角落
win + s 全螢幕, win+shift+s縮小
but.. 因為pi 預設 win 一按下去就會打開 lxpanelctl menu我把<keybind key="Super_L">小改了一下變成
首先要先找到設定熱鍵的檔案(/home/pi/.config/openbox/lxde-pi-rc.xml),然後用某個文字編輯器(pi os 預裝有geany,就決定是你了)開啟它
~$ geany /home/pi/.config/openbox/lxde-pi-rc.xml
<keybind key="W-a"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>100%</height> <x>0%</x> <y>0%</y> </action></keybind><keybind key="W-d"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>100%</height> <x>50%</x> <y>0%</y> </action></keybind><keybind key="W-x"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>100%</width> <height>50%</height> <x>0%</x> <y>50%</y> </action></keybind><keybind key="W-w"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>100%</width> <height>50%</height> <x>0%</x> <y>0%</y> </action></keybind><keybind key="W-q"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>50%</height> <x>0%</x> <y>0%</y> </action></keybind><keybind key="W-e"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>50%</height> <x>50%</x> <y>0%</y> </action></keybind><keybind key="W-z"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>50%</height> <x>0%</x> <y>50%</y> </action></keybind><keybind key="W-c"> <action name="UnmaximizeFull"/> <action name="MoveResizeTo"> <width>50%</width> <height>50%</height> <x>50%</x> <y>50%</y> </action></keybind><keybind key="W-s"> <action name="Maximize"/></keybind><keybind key="W-S-s"> <action name="Iconify"/></keybind>[Raspbian][ raspberry pi ] dock window 與熱鍵修改
2021年4月25日 星期日
raspberry pi 截圖 without printscreen 按鍵
Microsoft的all in one 鍵盤加觸控板不知為何沒有printscreen鍵..
只好用terminal呼叫截圖程式
先用ctrl+alt+t打開termainal
呼叫scrot截圖
它還可以帶一些參數呼叫
scrot -s 框選擷取範圍
scrot -sb 選取視窗
scrot -d num num秒後截圖
scrot -cd num 倒數num秒後截圖
截下來的圖都會放在 ~目錄
raspberry pi 截圖 without printscreen 按鍵
[Raspbiam]raspberry pi4時鐘格式
用Raspbian OS 若想把toolbar換到左/右邊可以在工具列上
右鍵 > Panel settings > Position > Edge 去選擇工具列位置
如果選側邊,可以把Size調整成跟icon size差不多比較簡潔
後pi預設是多的視窗不會合併,這可以從
task bar(window list) settings > combine multiple application windows into a single button 去設定
這時候還有個問題,時鐘分的部份會看不到分
這可以在時鐘那邊按右鍵
digital clock settings > clock format
例如我用的是
%a%n------%n %d%n%b%n------%n%H%n:%M
效果像這樣
