Collection for Y2016W49 (2016-12-05 Mon 00:00:00 +0800 ~ 2016-12-12 Mon 00:00:00 +0800)

cli

  • GNU Screen splitting
    • CTRL-a SHIFT-\ (CTRL-a |) (:split -v) to split the screen vertically.

    • CTRL-a SHIFT-s (CTRL-a S) (:split) to split the pane horizontally.

    • CTRL-a TAB to move between the panes

    • CTRL-a SHIFT-x (CTRL-a X) will close the pane that has focus

    • CTRL-a d will detach screen from the TTY and put it in the background. Resume with screen -r

    • CTRL-a n and CTRL-a p shifts input focus to the next & previous window, respectively.

    • CTRL-a SHIFT-a (CTRL-a A) will ask you to set the title of the focus window.

    • CTRL-a SHIFT-' (CTRL-a ") list available windows

django

  • mysql - Database returned an invalid value in QuerySet.dates() - Stack Overflow
    • Appreciate your help to resolve it. Looks like error caused Django's 1.6 timezone functionality changes(https://docs.djangoproject.com/en/1.6/ref/databases/#time-zone-definitions).

    • 用公司的 Django 1.6 時遇到的問題,要在 model 裏面使用 timezone 的話,必須要在 MySQL 先載入 timezone 相關的 table
      • mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql -u root -p

git

  • git ready » list remote branches
    • Sometimes you may need to figure out what branches exist on a remote repository so you can pull them down and check them out, merge them into your local branches, etc.

    • git branch -r

github

job

linux

machine_learning

python

security

software_engineering

  • [[好文導讀] [Dear Product Managers …] 親愛的產品經理- 來自曾經支持你的工程團隊!](http://www.evanlin.com/reading-dear-pm/)

stackoverflow

  • How do I force remove a package in Arch with pacman? - Unix & Linux Stack Exchange
    • pacman -R 移除某個 package 的時候,如果有其他 package 相依於該 package 的話就無法移除
    • 如果仍要強制移除該 package 的話,有兩種解法:
      • pacman -Rd: 不管相依性,直接強制移除該 package。
      • pacman -Rc: 把該 package 跟所有相依於該 package 的 packages 全部一起移除掉(注意:會遞迴下去)。
  • git - How to cherry-pick multiple commits - Stack Overflow
    • git cherry-pick A..B
      • every commit after A up to and including B.
      • not include commit A.
    • git cherry-pick A^..B
      • include commit A.
    • Commit A should be older than commit B. If they're the wrong order the command will silently fail.

unix

vim

  • Syntastic overrides let g:syntastic_python_checker = 'flake8 --ignore=E501' · Issue #204 · vim-syntastic/syntastic · GitHub
    • syntastic 這個 vim plugin 遇到要改 Python linter 的問題,然後查到這個。
    • 要在 ‵vimrc‵ 裡頭用 ‵let g:syntastic_python_flake8_args = '--ignore=E501'‵ 這樣的寫法才有用
    • 然後 let g:syntastic_python_checkers = ["flake8","pep8","pyflakes","pylint"] 的順序會影響 syntastic 的運作
      • 按照順序來,只要其中一個沒安裝的話 syntastic 就會自動停止
      • 以這個設定來看的話,也就是只要沒有安裝 flake8 的話,syntastic 的 python syntax checking 就不會 work
      • 但如果全部都有安裝的話,就會照著這個順序一個一個檢查,所以把最常用的要擺在最前面

web

windows


trivia

misc

taiwan

life


Share


Donation

如果覺得這篇文章對你有幫助, 除了留言讓我知道外, 或許也可以考慮請我喝杯咖啡, 不論金額多寡我都會非常感激且能鼓勵我繼續寫出對你有幫助的文章。

If this blog post happens to be helpful to you, besides of leaving a reply, you may consider buy me a cup of coffee to support me. It would help me write more articles helpful to you in the future and I would really appreciate it.


Related Posts