Archives

Character by Character Diff

I have two very long JSON strings. In a glance, they are the same, but their
MD5 hashes are not. The diff tool is line based, but those two JSON strings
are single line without newline character. So, I really need a tool that can
diff character by character instead of line by line and with highlighting.
What I have found is vimdiff.

Must have vim installed not just vi:

The program 'vimdiff' can be found in the following packages:
 * vim
 * vim-gnome
 * vim-tiny
 * vim-athena
 * vim-gtk
 * vim-nox
Try: sudo apt-get install <selected package>

What I have found out by using vimdiff is that both JSON strings are the
same if converting to objects, but the ordering of properties are different,
which is very difficult to tell by eyeballing.

References:

BitTorrent Sync

BitTorrent Sync automatically syncs files between computers via secure, distributed technology.

This is nothing new, I am using Dropbox everyday. But the catch line is that there is no storage limit and it is using P2P method to directly sync between computers. The only limit is the size of your hard disk. Nowadays, you should have pretty. This is not a cloud storage service, it is a piece of software.

Here is a list of some cloud storage services:

There are many more file hosting services or online backup services.

GitHub Flavored Markdown

If I use GitHub to host my blog, and write the content in Markdown, then we not use GitHub Flavored Markdown. There are a few difference that are most relevant to me.

Fenced code blocks with syntax highlighting instead of four spaces:

1
2
3
(function(){
// Do something
}());

instead of four spaces:

(function(){
  // Do something
}());

Which is essentially the same, but GitHub flavored is better, since sometimes I write code block in Google Docs, and the syntax highlighting.

And don’t forget that emoji emoticons are supported. :smile: :smiley: :laughing: