當執行 sbt 時發生 no trusted certificate found 的解法
移除 openjdk-9 安裝 openjdk-8
2016年12月28日 星期三
2016年8月24日 星期三
enable tab to click in fedora
在 /etc/X11/xorg.conf.d 建立 99-touchpad.conf (數字很重要,99比較好)
有下面內容
有下面內容
Section "InputClass"
Identifier "touchpad overrides"
# This makes this snippet apply to any device with the "synaptics" driver
# assigned
MatchDriver "synaptics"
####################################
## The lines that you need to add ##
# Enable left mouse button by tapping
Option "TapButton1" "1"
Option "TapButton2" "3"
# Enable vertical scrolling
Option "VertEdgeScroll" "1"
# Enable right mouse button by tapping lower right corner
Option "RBCornerButton" "3"
####################################
EndSection
2016年5月16日 星期一
multi interface in ubuntu cloud image
add auto eth1 and iface eth1 inet dhcp to /etc/network/interface
http://askubuntu.com/questions/262054/creating-multiple-interfaces-on-openstack-instances
2016年4月9日 星期六
更新 mp3 id3 亂碼
更新單一目錄 mp3
mid3iconv -e big5 *.mp3
更新目錄下髓有 mp3
find . -iname "*.mp3" -execdir mid3iconv -e big5 "{}" \;
參考資料
http://david50.pixnet.net/blog/post/22253957-%5B%E7%AD%86%E8%A8%98%5D%E5%9C%A8ubuntu%E4%B8%8B%E5%A4%A7%E9%87%8F%E8%BD%89%E6%8F%9Bid3%E4%B9%8B%E7%B7%A8%E7%A2%BC
2016年3月27日 星期日
windows linux dual boot time issue
windows linux dual boot time issue
old solution:
edit /etc/default/rcS
make UTC=no
new solution:
timedatectl set-local-rtc 1
old solution:
edit /etc/default/rcS
make UTC=no
new solution:
timedatectl set-local-rtc 1
2016年1月25日 星期一
檔案雙向同步的 open source 解決方案 (solution for two way sync folder)
目錄雙向同步的解決方案
可以使用 csync (不要使用 rsync ,因為一不小心你的檔案就會被刪除)
csync 比較簡單
ubuntu 下可以用下面指令安裝
$sudo apt-get install csync-owncloud
補充其他資料:
DRDB: 好像是 block-based 的同步
https://syncthing.net/ : 類似 btsync
unison: 兩個檔案即時同步
syncany 似乎也不錯,不過他做的事情比較多
可以使用 csync (不要使用 rsync ,因為一不小心你的檔案就會被刪除)
csync 比較簡單
ubuntu 下可以用下面指令安裝
$sudo apt-get install csync-owncloud
補充其他資料:
DRDB: 好像是 block-based 的同步
https://syncthing.net/ : 類似 btsync
unison: 兩個檔案即時同步
syncany 似乎也不錯,不過他做的事情比較多
2015年12月8日 星期二
android sdk 常用指令
tools/android 開啟 Android SDK Magager
tools/android avd Displays the AVD Manager window.
tools/android avd Displays the AVD Manager window.
2015年11月18日 星期三
iptables Packet Flow
forwarding
mangle PREROUTING
nat PREROUTING
mangle FORWARD
filter FORWARD
mangle POSTROUTING
nat POSTROUTING
2015年11月13日 星期五
替 docker container 的 apt/yum 設定 proxy
要替 apt-get / yum 設定 proxy 很簡單
這對你需要一直 rebuild image 然後 rebuild 時無法使用 cache 時很有用
只要加上下面的內容到 Dockerfile 即可
ENV http_proxy=https://evil.corp.proxy:80 ENV https_proxy=https://evil.corp.proxy:80
2015年6月7日 星期日
scala list collect 用法
scala list collect 用法
collect methoad 接受 PartialFunction 作為參數。結果產生一個 list。輸出 list 的內容是該 PartialFunction 有定義且由 PartialFunction 運算後的值
PartialFunction 長的像這樣
{
case a: Int => a.toString
case a: String => 1
}
以下面例子作為說明
List(1, 2, "3", Nil) collect { case a: Int => a.toString case b: String => 1}
其結果為
List(1, 2, 1)
說明
原始的 list 內容是整數 1, 2
和字串 3 和一個 Nil 物件
整數 1 和 2 有定義在 PartialFunction,
因此1 和 2 經過 PartialFunction 運算後,會放在結果
又字串 3 有定義在 PartialFunction,
因此 3 經過 PartialFunction 運算後,會放在結果
又 Nil 不沒有定義在 PartialFunction
因此沒有出現在結果
collect methoad 接受 PartialFunction 作為參數。結果產生一個 list。輸出 list 的內容是該 PartialFunction 有定義且由 PartialFunction 運算後的值
PartialFunction 長的像這樣
{
case a: Int => a.toString
case a: String => 1
}
以下面例子作為說明
List(1, 2, "3", Nil) collect { case a: Int => a.toString case b: String => 1}
其結果為
List(1, 2, 1)
說明
原始的 list 內容是整數 1, 2
和字串 3 和一個 Nil 物件
整數 1 和 2 有定義在 PartialFunction,
因此1 和 2 經過 PartialFunction 運算後,會放在結果
又字串 3 有定義在 PartialFunction,
因此 3 經過 PartialFunction 運算後,會放在結果
又 Nil 不沒有定義在 PartialFunction
因此沒有出現在結果
訂閱:
文章 (Atom)