Sequel Pro cannot create a JSON value from a string with CHARACTER SET ‘binary’

I had this problem dealing with exports made by Sequel Pro. I unchecked the Output BLOB fields as hex option and the problem went away. Visually inspecting the export showed legible JSON instead of binary.

导出数据的时候把 “Output BLOB fields as hex” 这个选项取消就可以了。


使用 gitbook 创建一本书 这个文件相对于是一本书的目录结构。比如 :

# Summary
* [Introduction](
* [基本安装](howtouse/
   * [Node.js安装](howtouse/
   * [Gitbook安装](howtouse/
   * [Gitbook命令行速览](howtouse/
* [图书项目结构](book/
   * [ 与 SUMMARY编写](book/
   * [目录初始化](book/
* [图书输出](output/
   * [输出为静态网站](output/
   * [输出PDF](output/
* [发布](publish/
   * [发布到Github Pages](publish/
* [结束](end/


Chrome Hotkeys

In Omnibar, press tab after a search-able website will search for the website prefix ? will search forcefully

⌘T  Open a new tab
⇧⌘T Reopen tab just closed
⌘W  colse a tab
⌘⌥→ Go to left tab
⌘[  / Delete    Go back in history
⌘]  / Delete    Go forward in history
⌘M  minimize
⇧⌘B show/hide bookmark bar
⇧⌘J Open Downloads
⌘Y  Open History
⌘L  omni bar
⌘R  reload page
⌘F  find
⌘G / ⏎  find next
⌘⌥I Inspect element
⌘⌥J JavaScript Console
⌘+Shift+D   Save all tabs in one folder
^⌘F Full screen(Mac style)
⌘-Shift-F   Real Full Screen

Macbook tricks



PYTHONPATH 变量会干扰brew安装的python3

Dock放在左边,设置F1,设置轻触,设置全局控制 使用tab键切换

You can make movie with quick time

Option + Command +Esc 强制退出程序

Homebrew + iterm2 真乃神器
Brew cask is a good thing

Hold option+command and mouse to do a block selection

Weird, mac echo not working with \e but \033


快速设置一台新的 Mac

0. Install iterm2, 
    a. set the color scheme to solarized and 
    b. change alt key to esc+
    c. Set font to monaco for powerline
1. install Homebrew from
2. Generate a new ssh key by:
    a.     `ssh-keygen`
    b.     `ssh-add ~/.ssh/id_rsa`
3.  install zsh: 
4. install go and python: `brew install go python python3`
5. install tmux: `brew install tmux`
6. install dotfiles: `git clone [email protected]:yifeikong/dotfiles .dotfiles`


Command-H 隐藏最前端应用的窗口。要查看最前端的应用但隐藏所有其他应用,请按 Command-Option-H。

Option-Command-= 最大化窗口

Command-M 将最前端的窗口最小化至 Dock。要最小化最前端应用的所有窗口,请按 Command-Option-M。

Command-W 关闭最前端的窗口。要关闭该应用的所有窗口,请按 Command-Option-W。

Option-Command-Esc 强制退出:选择要强制退出的应用。或者,按住 Command-Shift-Option-Esc 3 秒钟可仅强制最前端的应用退出。

Shift-Command-3 屏幕快照:拍摄整个屏幕的屏幕快照。了解更多屏幕快照快捷键。

Command-逗号 (,) 偏好设置:打开最前端应用的偏好设置。

Control–Command–电源按钮 强制 Mac 重新启动。


Command-D 从“打开”对话框或“存储”对话框中选择“桌面”文件夹。

Option-Delete 删除插入点左边的字词。

Fn-Delete在没有向前删除键的键盘上向前删除。也可以使用 Control-D。

Command-Delete 在包含“删除”或“不存储”按钮的对话框中选择“删除”或“不存储”。

Fn–上箭头 向上翻页:向上滚动一页。 

Command–上箭头 将插入点移至文稿开头。

Command–左箭头 将插入点移至当前行的行首。

Option–左箭头 将插入点移至上一字词的词首。

Option–左箭头 将插入点移至上一字词的词首。

Control-L 将光标或所选内容置于可见区域中央。