• 2013-09-28

    How to deal with git clone error?

    Views: 10522 | No Comments

    I ran into a github HTTPS clone error as this:

    $ git clone https://github.com/ideawu/ssdb.git
    Initialized empty Git repository in /xxx/.git/
    Cannot get remote repository information.
    Perhaps git-update-server-info needs to be run there?

    Try to use this instead: git clone git://github.com/ideawu/ssdb.git, problem solved.

    DO NOT copy the git url from github, because it is in the form of: git@github.com:ideawu/ssdb.git, this need you to set up a LOT of things! Using git://github.com/xxx/yyy.git is the easiest way to clone a read-only repo annonymous.

    Posted by ideawu at 2013-09-28 16:56:00 Tags:
  • 2013-08-15

    Why should I type the full QUIT word to quit a cli application?

    Views: 7239 | No Comments

    Many command-line application ask the user to type in every character of the word “quit” and press Enter to quit the application. But I want to ask the reason why? Why can’t I just type in only the character ‘q’ and press Enter, or press ESC key to quit?

    Actually, many cli application like redis-cli said it received a bad command when user type in ‘q’ and press Enter. So, the ‘q’ command doesn’t map to any other operation. So it is available to map ‘q’ to the quit operation.

    As for the convienience of users, ssdb-cli allow user to type in ‘q’ to quit the application.

    Posted by ideawu at 2013-08-15 14:00:09
  • 2013-03-01

    TextMate disable auto matching parentheses, braces, quotes

    Views: 9621 | No Comments

    TextMate is a great text editor, by default, it has a Auto Matching(Auto-Paired Characters) feature, that TextMate will automatically insert ), }, ", ' when you type in (, }, ", '. Someone may not like this feature, here is a way to disable TextMate’s Auto Matching parentheses, braces, quotes.

    Open Bundle Editor [Bundles -> Edit Bundles]
    Create a new bundle. [Command-N, select bundle]
    Create a new setting in that bundle. [Command-N, select setting]
    Set the Scope Selector to *, that matches everywhere.
    Set the smart typing pairs to an empty list. [Paste the below snippet into textview]

         smartTypingPairs = ();

    Save [Command-S]

    Copy from: http://pastie.org/private/cq4osggyikwtd2jy68ya

    Posted by ideawu at 2013-03-01 11:10:02
  • 2013-02-21

    Mac lock screen shortcut

    Views: 7028 | No Comments

    On a Windows PC, we use Windows + L keyboard shortcut to lock screen, but what is the shortcut on Mac OS to lock screen(desktop)?

    Write a script? Create a service? Keychain… all nonsense!

    The Mac lock screen shortcut is: CTRL + SHIFT + Power(Eject)!

    Posted by ideawu at 2013-02-21 22:49:05
  • 2013-01-10

    Replace Redis zRangeByScore with SSDB zscan

    Views: 7462 | No Comments


    zRangeByScore is one of the most powerfull command in Redis, it is used in zset pagination, like ‘list messages in by inbox’.

    SSDB provides zscan, which is similar to zRangeByScore.


    zRangeByScore(name, score_start, score_end, options);


    zscan(name, key_start, score_start, score_end, limit);

    The key_start parameter makes it possible to distinguish items with same score.

    Posted by ideawu at 2013-01-10 13:19:30
|<<<12>>>| 1/2 Pages, 9 Results.