rcmdnk's blog

Japanese ver.: Google Translateのイベントトラックをユニバーサルアナリティクスでも有効にする
Google Analytics

I recently noticed that an event tracking of Google Website Translator is no longer available.

What I was changed is the code of Google Analytics: old ga.js code to new Universal Analytics code, analytics.js.

It seems Google Translate code is not updated for Universal Analytics. Here is my attempt to fix it by modifying core codes of Google Translate.

Read on

Japanese ver.: sshでConnection reset by peerと接続が切れるのを防ぐ
SSH, The Secure Shell: The Definitive Guide

When I was working with ssh, sometime a ssh connection was broken with a message:

Read from remote host example.com: Connection reset by peer
Connection to example.com closed.

This is because that a connection is cut by a router if there is no action for a while.

To prevent such a situation, there are several ways like below.

Read on

Japanese ver.: JavaScriptだけでブログがコピーされた時にその内容をメールで送る

B0863R7NPW

Mandrill

It is interesting to know what parts are copied by readers.

Though GitHub Pages cannot use such PHP, I found a way to send email by JavaScript as written in Send a mail by JavaScript with Mandrill.

Using this function, copy notice function was implemented in this blog.

Read on

Mandrill

Once you became to have a lot of posts, Octopress’ rake generate command could take a long time.

When you want to check your site, normally it is needed to build only your new post. While Octopress has tasks of isolate/integrate to achieve such usage, it needs some manual commands, and there is a risk to push your site with only a new post.

In this post, I will introduce how to speed up rake generate with an easy command, and in safety.

Read on
}