Fixing WordPress’s Maintenance Mode Caused By Broken Update

WordPress upgrade tools is way AWESOME! It help us upgrade core system, plugins, and themes easily. However, as with many other human products, failed is one of it’s features.

Continue reading “Fixing WordPress’s Maintenance Mode Caused By Broken Update”

Share

Search Stackoverflow Right From Your Google Chrome

I just recently realized that you can search any content on stackoverflow, right from your chrome’s OmniBar. How you do that? We’ll you can follow this simple steps:

Continue reading “Search Stackoverflow Right From Your Google Chrome”

Share

Reset File Association in Linux From Nautilus

If you have ever experienced, for example, installing an application that turned out change the way how a file is opened. For example, to open a txt file in gnome, gedit is used. But, at a time, you install, geany or mousepad. When you want to open the txt file again, instead of calling gedit, system will call mousepad to open it.

Continue reading “Reset File Association in Linux From Nautilus”

Share

Loading Contact-Form-7 Plugin Outside Post/Page/The_Loop

Hi, just want to share little snippet. I was developing wordpress site for my client and I want to use Contact-Form-7 (CF7) to speed-up my development time. I need to add form (custom form) outside the loop / post / page content. From CF7’s documentation, there’s no single text explaining how to do it.

So, I guess I have to get my hand dirty by crawling the code. Here’s how I do that.
From anywhere on wordpress theme files, put this code to display your CF7 form:

<?php echo do_shortcode ( '

' ); ?>

Share

How To Prevent Someone From Executing xkill

From wikipedia entry:

Xkill is a utility program distributed with the X Window System that instructs the X server to forcefully terminate its connection to a client, thus “killing” the client.

Someone at id-ubuntu mailing list asked how to prevent someone from executing xkill. After reading this, my evil mind popped a solution >:).

My strategy is rather simple, you rename that xkill and move it somewhere else and put a script in place of xkill. Here’s the run down:

  1. rename xkill and move it somewhere else: sudo mv /usr/bin/xkill /etc/init.d/llikx_hide
  2. put a script in place of xkill:
    sudo touch /usr/bin/xkill
    sudo chmod 555 /usr/bin/xkill
    sudo nano /usr/bin/xkill
    

    Put this script:

    #!/bin/bash
    
    logger "I'm trying to execute xkill";//logger will automatically save user who execute logger 
    zenity --info --text "What are you doing?\nxkill execution is locked and logged\!" --title "Operation failed";
    
  3. There you go. Everytime someone trying to execure xkill, they will see popup window.

Share

Multiple Boot Partition Tips

Yesterday, I had a chance to install ubuntu 9.10 ‘karmic koala’ on my laptop. Having read several online reviews made me rethink my strategy. Previously, whenever there’s new ubuntu release, I will always do fresh install. Now, several minor but annoying bug appeared in reviews where I had similar hardware :(. Kind of annoying, but, I’ll still try it.

Continue reading “Multiple Boot Partition Tips”

Share

Wrapping get_post_meta() with default value

As wordpress developer, we will almost always use get_post_meta(). There’s a catch in using it though, as there will be situation where we want to get a meta value on a non initialized meta. Something thing we expected to be present but not created yet.

Continue reading “Wrapping get_post_meta() with default value”

Share