Shammer's Philosophy

My private adversaria

Edit GIT runtime information

This should be the action after Move EmacsConfig from Dropbox to GIT - Shammerism.

Change Editor

$ git config --global core.editor "/Applications/Emacs.app/Contents/MacOS/Emacs -nw"

On my Mac, this should be defined with full path. If determined just "emacs", it will be failed to run.

Change Committer information

GIT generates automatically committer information based on the current login user account on the host and it's hostname. This information can be edited by "git config --global --edit" and edit it.

Git operation after modified some files

This is a continuation of Move EmacsConfig from Dropbox to GIT - Shammerism.
I modified some files getting from My GIT repository and executed following commands.

  1. git commit -v -a -m "Message about this commit"
  2. git push -u origin master

But, nothing has been changed in my remote repository.
In this case, -u option should NOT be added. Following commands are updating local and remote repository and other git environment can pull the updated resources.

  1. git commit -v -a -m "Message about this commit"
  2. git push origin master
  3. At other git environment, git pull

Move EmacsConfig from Dropbox to GIT

I use https://bitbucket.org/, and this is a procedure how to move EmacsConfig files to git repository of bitbucket.org from Dropbox.

  1. Create repository on bitbucket.org
  2. git clone https://$bitbucketUserName@bitbucket.org/$bitbucketUserName/$bitbucketRepositoryName.git
  3. cd $bitbucketRepositoryName
  4. echo "# ReadMe of $bitbucketRepositoryName" >> README.md
  5. git add README.md
  6. git commit -m "Initial commit with ReadMe"
  7. git push -u origin master
  8. cp -r $DropboxEmacsConfigDir .
  9. find . -name '*.el' -exec git add {} \;
  10. git commit -m "EmacsConfig files initial commit"
  11. git push -u origin master

New directory whose name is same as a repository name would be created when git clone command done. So I did above commands in $HOME/Workspace.
After above action done, change $HOME/.emacs.d symbolic link.

  1. cd
  2. rm .emacs.d
  3. ln -s Workspace/$bitbucketRepositoryName/ .emacs.d

Karabinarのオプション

これまで、セミコロンをsticky shiftとして使用してきた。KarabinarでFor JapaneseのChange Semicolon(;) Keyを開き、Semicolon to Sticky Shift_L(effective only when input source is Japanese)にチェックを入れることでこれをやっていたが、久々に起動してみると同じFor Japanese配下に「Simultaneous Key Presses」なるものが追加されており、この中に「日本語入力時にF、Jキーの同時押しをSticky Shiftにする(SKKと一緒に使うと便利です。)」なる設定が追加されていた。いつの間に・・・
そもそも、久々にKarabinarを起動したのは、SKKで日本語入力モード中にコロンを打てなくなってしまっていたからだ。日本語入力モード中にコロンを打ちたいときは、一度SKKをオフにしてコロンを入力、再度SKKをオンにするということをやっていたが、ついにこの作業が面倒になってのこと。どうにかうまくSticky Shiftを有効にしたままコロンを打つことができないか考えてみようと思っていたところだったが、Semicolon to Sticky Shift_Lのチェックを外し、F+JのSticky Shiftをオンにすることでコロンの問題は解決。
まだたまに;を打ってしまうが、これは慣れが解決してくれるだろう。Emacsでも同様にできれば完璧か。今はEmacsはKarabinarによって変更されたキーバインドの影響を受けないようにしているが、Emacsでも同様のことができないか、後日調べてみようと思う。

Which?

Debian Stretch Debut! - Shammerismの記事を書いたころだったろうか。MacからLinuxに本格的に移行しようと思ったものだったが、OSのせいではなくPCの問題かもしれないが、トラックパッドの使い心地やたまに発生するマウスポインタが勝手に移動する現象に遭遇すると、やっぱりMacだなぁ、という気持ちになってしまう。自分にとってのメリットとデメリットを整理してみる。

Macのメリット

  • 安定している
  • プリンタなどLinuxと比較すると設定が容易

Macのデメリット

  • 一番相性のいいクラウドサービス、iCloudの容量拡張費用が他と比較して高い
  • iPhoneが高い
  • 納得のできるレポジトリサービスがない

Linux(Debian)のメリット

  • なんだかんだでapt-getに慣れている
  • 日常的に業務で使っているので触れる時間が長ければ長いほど業務効率の上昇を期待できる

Linux(Debian)のデメリット

  • Macと比較してトラックパッドの使い勝手が悪い
  • 設定が大変
  • 相性の良いスマホがない
  • バッテリーの持ちが悪い(OSでなくPCの問題)

Debianでは長い間、GNOMEのNaturalScrollがうまく機能しなかった。これの改善を待っていたが、改善されてよし、ということで使ってみたが、マウスポインタが勝手に動いてしまうとか、なんとなく反応が悪いとか、これは日常的に使用していて非常に困る。やっぱりMacから離れるのは自分にとっては現実的な選択肢でないのかもしれない。というわけで、明日予約できるiPhoneXを予約することにしよう。

Debian Stretch Install Procedure

In this article, I said that I would try Debian Stretch installing my Thinkpad. This is a procedure.

  1. Download ISO included non-free firmware from this site
  2. Burn this ISO into CD-R or DVD-R
  3. Boot from this CD-R or DVD-R
  4. Select Expert Install
    1. Choose language
      1. Language is English
      2. Location is Tokyo/Asia
      3. Locale is C
    2. Keyboard is American English
    3. Select default values until host configurations
      1. Network configuration is Auto
      2. Configure hostname and domain
    4. Configure user
      1. Enable shadow password
      2. Don't allow root login and define root password
      3. Configure normal user
    5. Using NTP and Locale is Tokyo/Asia
    6. Configure partition, using all disk with automatically partition size
    7. Install base image is linux-image-amd64
    8. Device driver is installed only for this machine
    9. Configure package manager
      1. Use network mirror
      2. Download protocol is http
      3. Mirror country is Japan
      4. apt-server is deb.debian.org
      5. Not using proxy
      6. Use non-free software is yes
    10. Install Software Selection
      1. Join popularity contest
      2. Only System Tools selected
    11. GRUB Installation
      1. Select YES at Install the GRUB boot loader to the master boot record
      2. Next question is NO(default)
    12. At last phase, asked if changing NTP location to UTC from Tokyo/Asia, select No
  5. After reboot, changing Keybinding CapsLock to Ctrl, edit /etc/default/keyboard like below and reboot
XKBMODEL="pc105" 
XKBLAYOUT="us" 
XKBVARIANT="" 
XKBOPTIONS="ctrl:nocaps" 

BACKSPACE="guess"
  1. After reboot, configure wifi
    1. ip link set wlp3s0 up(wlp3s0 might be different on each environment)
    2. iwlist wlp3s0 scan and check the ESSID to connect
    3. wpa_passphrase $ESSID $PASSPHRASE>>/etc/network/interfaces
    4. edit /etc/network/interfaces like below
iface $WifiName inet dhcp 
  wpa-ssid $ESSID 
  wpa-psk $wpa_passphrase_result
    1. ifup wlp3s0=$WifiName
  1. Install following software with apt-get

QUERY is very useful!!!

I have never been digging GoogleSpreadSheet, but this product(should say as service?) has great functions. I amaze Query.
This function requires at least 3 parameters, 1st is the range, 2nd is a condition which values I would like to filter, 3rd is something I am not sure. Here is a simple Query command.

=QUERY(A:D, "SELECT B WHERE C = 10")

What I amaze is supporting filter syntax like SQL. I am not familiar with the application like Excel, Numbers, Google Spread Sheet, so other application has a function kind of like Google Spread Sheet "QUERY", but I'm not sure about it. At least, this point reinforces me to use Google Spread Sheet.

Everybody knows that Google Spread Sheet can be used if there is a Internet Connection from all kind of devices. This point must be required in these latter days. Everything around me seems to say "You should use Google Services and Products more!!!".