Must have vim plugins
0Vim is one of the best editor I’ve used. It’s fully configurable, and has many rich functions. I fond the following plugins essential to make vim the perfect editor.
snipMate.vim
http://www.vim.org/scripts/script.php?script_id=2540
taglist.vim and CTags
http://www.vim.org/scripts/script.php?script_id=273
javascript.vim
http://www.fleiner.com/vim/syntax/javascript.vim
bookmarking.vim
http://www.vim.org/scripts/script.php?script_id=3022
matchit.vim
This is in the default installation under macros directory.
Deploying pyramid application on ep.io
0I tried to deploy pyramid application on ep.io today.
After some failure, I finally figured out that the reason, and got it work quite smoothly.
It seems that pyramid is using zope.interface >= 3.8.0, but the system has lower than that.
I added that line to requirments.txt and the homepage showed happily.
Note that epio does not work under windows at the moment, and you first need a pair of ssh keys, which are generated via ssh-keygen command.
After that, follow these steps:
1. Goto the pyramid application directory, and do epio create {appname}. This will create an epio.ini setting file
2. Create a wsgi entry file: wsgi.py with the following content
from pyramid.paster import get_app
application = get_app(‘development.ini’, ‘main’)
3. vim epio.ini.
Under [wsgi] section, set
entrypoint = wsgi:application
requirements = Pharaoh.egg-info/requires.txt
Under [static] section, set
/static = ./pharaoh/static
4. upload application with epio upload.
Remove dotted border of flash in Firefox
1It turns out the style is applied by outline. Disable it with outline:none; solved the problem.
Fix syntax highlighting in vim
0Vim will have syntax highlighting error when the file is very large and the file is opened with an initial view from the middle. After some research, I found use :syntax sync fromstart will fix the error.
http://vim.wikia.com/wiki/ surely has some nice tips.
Busy life
0I’ve been in Shen Zhen for a month so far. The city is nice and beautiful. The life here is nice. I feel it a lot better than Cheng du, and I dont think I’ll regret leaving that place.
For the 1st job here, I’m working as a Front end developer at Xunlei.com. It’s busy work. There’s additional work hours almost everyday. But I’m learning a lot here. I hope my hard works will finally pay off.
Disable text selection
0This is very cool.
http://www.ajaxcf.com/blog/index.cfm/2007/4/17/Disabling-Text-Selection-For-DragandDrop
A common usability problem encountered in Ajax apps is the unintentional selection of text when trying to do a drag-and-drop operation. This javascript function allows you to disable text-selection for a specific element on the page and should work in all modern browsers.
function disableSelection(element) {
element.onselectstart = function() {
return false;
};
element.unselectable = "on";
element.style.MozUserSelect = "none";
element.style.cursor = "default";
}
A trip after graduation
03 years ‘torture’ as a graduate student is about to come to a close. I’m so happy that I don’t have to touch biology any again. Tomorrow, I’m going to have a trip to JiuzhaiGou, Sichuan, China. It’s really going to be exciting. I hope this trip could help me get rid off these troublesome memories.
Use flash components in flash builder
0- Create a new file in flash IDE
- Drag the components to the library
- Export the library as swc
- In flash builder, add the swc as a library
- Then you are set. import fl.controls.RadioButton
Persistence
0I’m tired of working on practice projects! So far, I have bunches of projects sitting somewhere on my harddrive. They were created when I started learning flash as practice projects. Now, they have no use at all. I hate to see all those efforts become vain. So, time for a change.
I believe the failure for those projects is due to 2 reasons:
- lack of a good design. They can’t go any further, after they have fulfilled the practice purpose.
- I lack persistence and I switch projects too often.
So basically, from now on, I need to start from a good design and persist on it!
Vim – the best editor!
0Programmer spent most of their time editing text files. To do the job effectively, it’s wise to use the best tool for it. So far, I’ve tried quite a few. Some of them are good, but have poor UI design and lack some features, like Notepad++. Some have excellent design but lose at proformance, like Editra. Recently, I came across Vim and the quest in hunting for better editors ended.
Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.
Vim is often called a “programmer’s editor,” and so useful for programming that many consider it an entire IDE. It’s not just for programmers, though. Vim is perfect for all kinds of text editing, from composing email to editing configuration files.