2017年10月11日 星期三

crouton for chromeos


安裝 crouton 時,用下面指令

sudo sh crouton -t xfce,extension,xorg,xiwi

安裝 gedit

sudo enter-chroot sudo apt install gedit 


在 chrome os 上執行 gedit

sudo enter-chroot xiwi gedit

2017年10月4日 星期三

2017年9月30日 星期六

好用的 vim 設定檔(讓你的 vim 快速變 ide)

現在網路上有許多好用的 vim ide 設定檔。
目前找到好用的有:

  • Spacevim
  • Evervim
  • navim

我只有短暫的試用,因此無法寫出太詳細的介紹
( 我已經習慣自己的設定擋了,改不了XD)


Spacevim 模仿 spaceemacs ,所以有 layer 的概念。設定方法有點不一樣,用不太習慣。
Evervim 和 navim 用起來就差不多了,只差在功能多或少
我比較推薦 Evervim

2017年9月4日 星期一

用 vimwiki 做筆記(知識管理系統)

之前有在找作筆記的軟體,不過一直找不到喜歡的。後來愛上用 neovim 後, 發現用 vimwiki 十分好用。

我希望的筆記軟體功能有:
  1. 純文字
  2. 能夠使用熟悉的編輯器
  3. 能搜索
  4. 能夠上 tag (選項功能) 
  5. 能夠有 checkbox
  6. 能夠有表格
  7. 能夠紀錄程式碼
  8. 最好支援 markdown
  9. 手機和電腦都能夠使用與同步
  10. 能夠有圖片

2017年8月19日 星期六

在 hyper-v 調整 linux vm 螢幕解析度

1.編輯 /etc/default/grub

sudo vi /etc/default/grub


2. 修改 GRUB_CMDLINE_LINUX_DEFAULT 讓她看起來像這樣。在1920x1080的螢幕下,建議1400x750



GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=hyperv_fb:1400x750"




3. sudo update-grub



4. reboot







 

2017年6月5日 星期一

2017年6月2日 星期五

solution for Error 0x80070005 in bash on windows



If you failed to start bash on windows because of  Error 0x80070005,
just remove everything in %localappdata%\lxss directory.
It will works again

https://github.com/Microsoft/BashOnWindows/issues/473

2017年4月29日 星期六

python asyncio 入門介紹

asyncio 用在有些操作需要 block ,但是你不想要讓 main thread 被 block 時。你可以透過 multi thread 或是 multiprocessing 來解決剛剛的問題,但是建立 thread 或 process 的成本比較高,切換 thread 或 process 需要 kernel 介入,速度慢等問題。而 asyncio 無此問題。

點選文章閱讀全文

2017年4月3日 星期一

2017年2月25日 星期六

qubes hvm linux 網路設定

把以下的內容貼到 /etc/rc.local 並修改 ip 和 gateway。 ip 和 gateway 可以從 vm settings 裡找到



ip=10.137.5.44
gateway=10.137.5.1
ifconfig eth0 $ip netmask 255.255.255.255
ifconfig eth0 up
route add -host $dateway dev eth0
route add default gw $gateway
echo 'nameserver 8.8.8.8' > /etc/resolv.conf

2017年1月31日 星期二

atom editor 使用 alt +num 切換 tab 時,focus 會轉移到 tree-view 的解法

atom editor 使用 alt +num 切換 tab 時,focus 會轉移到 tree-view 的解法
解決辦法
移除 synced-sidebar plugin

2017年1月24日 星期二

windows 下,給 bash on ubuntu on windows 使用的最好終端機模擬器

如題,這是我目前看到最好用的終端機模擬器
用來跑  bash on ubuntu on windows

2017/01/24

https://github.com/mintty/wsltty

2017年1月8日 星期日

solutions for bash on windows hang because of some reasons

There are some way to break bash on windows.
One way is that move file using mv command.

To make your bash work again, this is a solution.
This is not the only solution.
The solution will clean all your data in bash on ubuntu on windows.
Use it carefully

Steps:

  1. lxrun.exe /uninstall /full /y
  2. rebootdelete all thing in "%LOCALAPPDATA%/lxss/temp/"
  3. reboot
  4. lxrun.exe /install