How to make Mac OS X Cursor More Visible

Post on by michaelyin

Sometimes after writing some code in the terminal, I find it very hard to find my mouse pointer quickly because it is very invisible in the dark background. So I decide to find a good way to solve this problem.

Actually there is not very good post about the mouse pointer in Mac, that is why I write this blog post.

1. Change system mouse cursor size

OSX does not ...

Send content to clipboard in ipython

Post on by michaelyin

Some time I need to copy very long string from ipython to some where such as web browser, this operation is little annoying if the string is too long. I think I can make this operation more comfortable. After some little test and here is my solution.

from IPython.core.magic import register_line_magic
def clip(line):
    global_dict = globals()
    if not line in global_dict:
    value = global_dict[line]
    import os ...

using profiles in ipython and Django

Post on by michaelyin


When I write my code in django shell, I found that django can launch ipython by typing ././ shell if ipython has been installed in virtualenv. However, I it seems it can not pass some argument like --profile into the ipython. So I can not let the ipython run some startup files by default.

I did some research on google, statckoverflow and so on, but failed to found ...

No Active Project In Scrapy

Post on by michaelyin

When I try to run scrapy spider in my terminal, it give me some error message like this

Scrapy 0.24.4 - no active project

Unknown command: crawl

Use "scrapy" to see available commands

It seems there is no good post about how to fix this problem, so this post will tell you how to fix it.

First, please check if there is scrapy.cfg in the root directory

your_project_dir ...

Manully build and install pyv8 in virtualenv

Post on by michaelyin

Here is the tutorials about how to build and install pyv8 in virtualenv on Ubuntu

cd ~
mkdir pyv8_install
cd ~/pyv8_install

#checkout the source code
svn checkout v8
svn checkout pyv8
git clone thug

#patch the pyv8
$ cp thug/patches/PyV8-patch1.diff .
$ patch -p0 < PyV8-patch1.diff
patching file pyv8/src ...