Skitch issues

Skitch on Mac is a  better alternative to the in-built Preview tool.. for adding annotations on pictures.

The only idiotic design flaw is the need to configure Evernote to save  pictures. I simply want to take a screenshot and add some annotation and save it.

Screen Shot 2013-11-17 at 6.34.21 PM

Why Evernote crap in the middle?. It beats the whole purpose of being a super simple annotation tool.

SharePoint 2013: Client Object Model errors when migrated from SharePoint 2010

There are multiple ways to phrase this problem

1. processQuery gives 403 forbidden in sharepoint 2013

2. sp.runtime.js Client OM x-requestdigest

The problem is due to the old sp.runtime.js and sp.core.js files.


By including  the new versions of the Client Object Model javascript files.. as shown below, the error goes away.


The old files are in the  /_layouts/ directory where as the new files in the /_layouts/15/ directory.

ruby/jruby script/console character encoding

There are many nagging ways in which discover this problem.

1. My database is utf8-uncode-ci encoding/collation but I still see french/chinese characters as ? (question marks).

2. The encoding is utf-8 in my database.yml

3. I believed rails does utf-8 encoding by default.

4. I can’t print the foreign characters in my script/console

5. The browser is sending the characters fine. Where the hell the characters got converted to question marks.


The steps to see this encoding issue in action ..

$LANG=en_US.iso88591 jruby script/console

>> puts ‘登录个人中心’


And the solution

$LANG=en_US.utf8 jruby script/console


Now that you know the solution… here is more information.

I found some old Redhat, Cent OS linux versions have the system character map set to US ANSI which is ISO-8859-1

You can see the linux system encoding by typing

$locale charmap

The summary is, the rails (2.3.18/jruby 1.7) picks up the system character encoding by default. Fix the system encoding (set it to UTF-8) and no ?s anywhere. Happy French and happy Chinese.

PS: Btw, I don’t know what those chinese characters mean.