/home/shakir

  • About
  • Archives
  • Contact

  • 27th December 2007
    • By Mohd Shakir
    • 13 Comments
    • Short Url

    Enable vim code (Python) auto complete

    Beginning version 7 of vim, it has this nice auto completion feature. It is by default however limited to words that has already been in the current workspace. To use it, simply press [ctrl] +n or [ctrl] + p key while in edit mode. For example: We can however *teach* vim to autocomplete a whole [...]

    • Read More
      • #python
      • #vim
  • 26th December 2007
    • By Mohd Shakir
    • 5 Comments
    • Short Url

    CSS for code block

    If you're wondering how do I actually get the nicely boxed code block in my blog as this;   then the answer to it is just to have this in my CSS: pre { border:1px dashed #E1E1E1; color:#333344; background:#FAFAFA; font-family:monospace; overflow:auto; font-size:11px; padding:0.5em; } and later I would just wrap whatever text I want to [...]

    • Read More
      • #html
  • 17th December 2007
    • By Mohd Shakir
    • 4 Comments
    • Short Url

    How to create a WordPress plugin

    I’m into writing a plugin for WordPress, and so let me just share here how easy it is to actually create one. For an example, we’re going to write a plugin that will insert a Google Adsense to our blog post. From our WordPress installation directory, create a file named google_adds.php in the wp-contents/plugins/ directory [...]

    • Read More
      • #howto
      • #php
      • #wordpress
  • 15th December 2007
    • By Mohd Shakir
    • No Comments
    • Short Url

    Interactive Python shell with IPython

    One nice thing about Python as compared to some other scripting languages, is that it has a shell that enables us to test our Python script on the fly without needing to write a script file first It’s nice and all that, but when you’re too used to IDEs which has features such as auto [...]

    • Read More
      • #python
      • #shell
  • 13th December 2007
    • By Mohd Shakir
    • 5 Comments
    • Short Url

    “‘BoundMetaData’ is not defined” error in SQLAlchemy

    I get this error when creating a BoundMetaData object in SQLAlchemy 0.3.10. The fix is to just use MetaData instead of  BoundMetaData. BoundMetaData is deprecated and replaced with MetaData Example code: from sqlalchemy import * db = create_engine(‘sqlite:///test.db’) metadata = MetaData(db) “”" Continue with the rest of your Python code “”"

    • Read More
      • #database
      • #python
      • #sqlalchemy
  • Next.
  • whoami

    A web developer, entrepreneur, and an opensource enthusiast.
  • tweets @mohdshakir

    • recent posts

      • Anonymous targeting Malaysia, and as a Malaysian, I’m happy about it
      • More Blood, More Life
      • Book giveaway: It’s Not How Good You Are, But How Good You Want To Be
      • Are your websites affected by Google’s Panda update?
      • To quit, or not to quit photography

    Copyright 2011, Mohd Shakir Zakaria