-
Recent Posts
Recent Comments
Categories
Links
Monthly Archives: July 2018
svn ignore tips
編輯 svn:ignore list注意dirname尾巴不要slash / svn propedit svn:ignore . 刪除svn:ignore svn propdel svn:ignore
Posted in System Administration
Leave a comment
js polyfill tips
polyfill的作法 這個方法是在webpack doc (https://webpack.js.org/guides/shimming/)看到的, 但其實動態load script的方式在很多地方都有應用,例如JSONP Getting Started + 在browser內javascript環境下的io都是asychronous的,所以為了要動態load script並確保執行順序,利用動態插入<script> tag 以及script synchronous load的特性來完成。
Posted in Front-end
Leave a comment
chromium os tips
下載 https://chromium.arnoldthebat.co.uk/?dir=daily 參考此篇安裝 How to Run Google Chrome OS From a USB Drive 其他 進console: Ctrl+Alt+F2 預設帳號: chronos 有些指令是要sudo 例如fdisk 預設是boot from usb 安裝寫入hard disk: root權限 chromeos-install –dst /dev/mmcblk0 (裝置路徑 如/dev/sda) Ctrl+Alt+/ => hot key tips Ctrl + F5 print … Continue reading
Posted in Tips
Leave a comment
function pointer print
#include #include void test() { } int main() { std::cout
Posted in C++ Language
Leave a comment
git with specific ssh key
需要將github private repo分享時,可針對repo使用collaborator方式加入帳號,缺點是該帳號具有寫入權限,或是在global設定可存取的ssh key,但這樣的key具有整個帳號的存取權限 另一種方式是針對repo加入deploy key,可以設定是否有寫入權限,但缺點是一旦在某個repo設定了key,不能在其他repo加入。 因此透過新生成的key來指定哪些key可以存取repo,而非使用機器預設的ssh key(~/.ssh/id_rsa)便成了一個折衷方式。 這樣一來可以針對每個repo分別gen一組(or多組)唯讀權限的key,與可寫入的key,再分發給使用者操作。 一行產生ssh key在特定位置(此處設為當前目錄) ssh-keygen -t rsa -b 4096 -f ./id_rsa -y -q -N “” git指定 ssh key 參考:https://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command ssh-agent bash -c ‘ssh-add /somewhere/id_rsa; git clone git@github.com:user/project.git’ 其他操作亦同 ssh-agent bash -c ‘ssh-add /somewhere/id_rsa; … Continue reading
Posted in System Administration
Leave a comment