hit counter

Timeline

My development logbook

Keep Vi Swp File in Tmp

vi is my editor of choice when I need to do some quick editing.

When vi edits a file, it will usally create a swp file for recovery purpose. Usually it causes no problem.

But apparently octopress does not work when there is temporry file in the post directory. Rake will emit

1
2
rake aborted!
No such file or directory - public/_posts/.2013-06-29-example.markdown.swp

and then bailed.

I added

1
set backupdir=~/tmp

to my .vimrc. Hopefully it will prevent this problem from happening again.

Problem With Shifting Python Code Right in Emacs

I am using Aquamacs Emacs which is built on emacs 23.3.50.1.

When I tried to indent a block of python code using the menu item ‘Python’ –> ‘Shift Region Right’, I got this error message Symbol's function defintion is void: py-shit-right

So instead of using the menu option, I just use C-c > to take care of it.

Good and Bad of Octopress

After used octopress for a couple of days seriously as a blogging platform, this is a list of good and bad I feel about the platform:

First a list of bad

1) It takes time to build and release changes. Whenever I release a new post, I need to regenerate the site (takes up to several minutes for about 850 posts at the time of writing) and then commit the changes to the github. And then there is usually some delay between the commit and the final appearance of the new post on the site.

2) With Octopress I will tend not to post spontaneously/impulsively as I was with Tumblr. It is because I will not be able to write and post with Octopress unless I am near my PC. Tumblr is, on the other hand, a web-based service and they have native apps on mobile platforms too. So I tend to post more on tumblr.

The goods:

1) The Octopress framework is very flexible. Anyone can write up any plugin in ruby to enhance the platform or add a new feature

2) I get to use my favorite editor vim

3) Writing programming topic is painful in Tumblr. It is more enjoyable to do it in Octopress

4) I get to keep my the primary material – All blog posts, theme customisation and pictures etc are created and verison-controlled on my PC in the first place.

5) Since it takes time to build and release the blog, the up-side is that I will post subjects that is worth writing about, instead of instagram-ish entries that are only there because it is convenient to pick a picture and post on a mobile phone.

What I need now is a decent way to spell-check in vim/emacs.

Dyld: Library Not Loaded

1
2
3
dyld: Library not loaded: @rpath/SenTestingKit.framework/Versions/A/SenTestingKit
  Referenced from: /Users/antkong/Library/Developer/Xcode/DerivedData/ebookreader-gplhzhssjudwymcrqpmxxokvhqvn/Build/Products/Debug/ebookreader.app/Contents/MacOS/ebookreader
  Reason: image not found

Is it going to be the answer?

I have found a fix by getting to know what @rpath means. It is a tag placed in the generation of an executable’s binary format indicating alternate paths to look for dependencies (including other libraries). By setting the build option “runpath search paths” to the developer frameworks directory, the executable looks in this place for the sen testing library at run time.