有些時候要 demo 一些東西,但是不能用自己的電腦,那麼就得想個方法,最好是不要安裝任何東西在 demo 的平台上,人家可能不答應,我們可能也擔心留下跟賣點有關的資訊甚至機密。node 在這種情況下相對單純,專案目錄和 node 目錄 copy 出來到 usb 上,手動指定 node 的執行位置,基本上就沒問題。 python 相對來講複雜許多,因為它可能很依賴一些 path 以及環境變數的設定。有人對解決方案做過一些 survey ,目前看來 WinPython 相對來說更新比較頻繁。也有人整理一些思路,例如撰寫 batch file 來設定所需的環境變數和目錄。 不過我想直接使用 WinPython 是比較簡單的~~
node.js 的部分,有人有討論過,也有人整理過流程。總之沒有要使用 npm 的話,事情就會單純許多。主程式的下載位置在 https://nodejs.org/dist/
2017年11月19日 星期日
2017年10月10日 星期二
git pull --rebase 的前置作業
- git commit -m "..." #確定 staging area 清空
- git log 找出上次 checkout 的版本
- git diff 版本號 #確定 diff 的內容可以接受,沒有不需要的檔案、目錄,不然merge會很久
- git remote -v #確定 remote repository 的名稱
- git pull --rebase repo名 branch名
- 中間會有需要手動解決的情況,編輯該檔案,並記得 git add 該檔案,接著下 git rebase --continue (或skip),事後要確認檔案內容
在 local repo 中移除特定目錄
比較特別的是要在 local repo 中移除特定目錄,但保留在 working dir 當中,參考此帖
簡言之就是:
git rm -r --cached 目錄名
並請記得在 .gitignore 中加入對應的一行,以斜線"/"結尾,這樣才能順利 commit
2017年9月21日 星期四
DOM 文件中節點樹的遍歷 (traverse)
參 https://www.codeday.top/2016/11/15/1705.html
上述網頁列出了5種方式。搭配 DOM 的官方文件使用:https://www.w3schools.com/jsref/dom_obj_all.asp
上述網頁列出了5種方式。搭配 DOM 的官方文件使用:https://www.w3schools.com/jsref/dom_obj_all.asp
2017年8月27日 星期日
遠端 SSH 連線又要在斷線後保持工作進度的方式 -- screen
使用方法可參 使用 Screen 指令操控 UNIX/Linux 終端機的教學與範例
講重點:
講重點:
- screen 開新工作
- 做想做的事
- ctrl-A D 暫時離開 screen
- 重連時下 screen -r
網路不穩被斷線時,screen不會知道,所以重新登入時會無法連上。這時請:
2017年8月19日 星期六
2017年8月15日 星期二
ubuntu 移動分割(partiton)的方式
參 https://help.ubuntu.com/community/MovingLinuxPartition
這是重寫過的版本,用到了安裝光碟。感覺上這個步驟比較保險
Step 1: Booting through Rescue CD
Step 2: Create new partition
Step 3: Clone Ubuntu partition to new location
Step 4: Generate and update UUID
Step 5: Update grub and fstab
Step 6: Update MBR to point the new grub
這是重寫過的版本,用到了安裝光碟。感覺上這個步驟比較保險
Step 1: Booting through Rescue CD
Step 2: Create new partition
Step 3: Clone Ubuntu partition to new location
Step 4: Generate and update UUID
Step 5: Update grub and fstab
Step 6: Update MBR to point the new grub
nvidia-docker 初探
參 https://hub.docker.com/r/nvidia/cuda/
原則上需要使用特製的 docker 版本: https://github.com/NVIDIA/nvidia-docker
不過它已經半年沒有動過了…
根據此文:https://github.com/NVIDIA/nvidia-docker/issues/429
nvidia-docker 近期內應該會上新版,並基於 https://github.com/nvidia/libnvidia-container 以方便 docker 改寫來支援更多平台
原則上需要使用特製的 docker 版本: https://github.com/NVIDIA/nvidia-docker
不過它已經半年沒有動過了…
根據此文:https://github.com/NVIDIA/nvidia-docker/issues/429
nvidia-docker 近期內應該會上新版,並基於 https://github.com/nvidia/libnvidia-container 以方便 docker 改寫來支援更多平台
訂閱:
文章 (Atom)