Installing XBMC for Raspbian

November 22nd, 2012 by leoganda No comments »

I bought Raspberry a month ago and I had so many research plans for this device. One of my idea is to make my old TV become complete media center solution. After googling some references I found that XBMC could help me!

Installing XBMC for Raspbian is really straight forward.

1. First add repository for the XBMC binaries, type this on your console :

sudo echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list

2. Get the GPG key for this repository

wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2012.05.05_all.deb

3. Install the GPG key you just download

sudo dpkg -i deb-multimedia-keyring_2012.05.05_all.deb

4. Update your package list

sudo apt-get udpate

5. Install XBMC

sudo apt-get install xbmc

Follow the instructions on your console.

6. Start XBMC
Type “xbmc” on your console to start XBMC

xbmc

Here’s the screen of XBMC

I tried some features such as Podcast, Internet Radio, Youtube, Vimeo, and Web browser. Everything works normally, but the web browser need more improvement! Also I test XBMC remote control using android device, this remote control is really helpful! Another thing what I love is we can install add-ons for XBMC from the XBMC dashboard.

How to archive email on Outlook for Mac

June 18th, 2012 by leoganda No comments »

Since there’s no archive menu on Outlook for Mac, in order to archive our email to our local computer we can do this trick.
Open Preferences->General
Then un-check the tick box “Hide On My Computer folders”.

You will see “On My Computer” under Inbox folder. To archive your email, simply select your emails then right click and choose move to “On My Computer”.

Remove index.php on CodeIgniter using .htacces

June 7th, 2012 by leoganda No comments »

By default CodeIgniter framework url will includes index.php, it’s pretty easy to remove index.php from your url to work with CodeIgniter using .htaccess.

I assume that your web server already enable mod_rewrite module (mostly any web hosting already enable it). Create new file .htaccess in your CodeIgniter code root (same level with index.php) as like this.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

Save it, and violaa… your CodeIgniter has pretty URL.

How to disable wordpress toolbar for all users

April 1st, 2012 by leoganda No comments »

New wordpress engine has a feature called toolbar and its shown in the top of our blog page. What ridiculous is there’s no built-in function to disable this toolbar for being shown to all our users, which mean the users have to manually disable it in their profile page. Fortunately we can use this snippet to disable this toolbar.

Add this snippet to your theme functions.php file

function my_function_admin_bar(){
    return false;
}
add_filter( 'show_admin_bar' , 'my_function_admin_bar');

How to post JSON data from Android to PHP Codeigniter

March 30th, 2012 by leoganda 1 comment »

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. This article explains how to client-server web service communication using Android and PHP, we will use JSON as the data.

We will build a simple calculator web service that has features such as add and multiply.

apikey represent key to access the webservice, the server will reject the request if the key is invalid, in this article we use “mykey123″
command represent what command request we want to use, in this article we use “add” or “multiply”
a and b represent input value we want to calculate » Read more: How to post JSON data from Android to PHP Codeigniter

Enable PHP display_error on MAMP 2.0.5

March 22nd, 2012 by leoganda No comments »

By default display_error on MAMP 2.0.5 is off, in my opinion it would be useful for me to turn it on for development phase of my application. This is how to enable display_error

  1. Find MAMP directory under Application Directory
  2. Go to MAMP\bin\php\
  3. Open PHP folder that you are using
  4. Then open \bin\conf\php.ini under your PHP folder
  5. Find error_reporting line, and make sure as “error_reporting = E_ALL
  6. Find display_errors = Off, and change it to display_errors = On
  7. Save then restart your MAMP
  8. Done

Run web.py as a service in linux

March 22nd, 2012 by leoganda No comments »

web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.

I was building a simple application with this library and need this run as a background service.

python /opt/server.py 8080 2>/dev/null &

Mac OS X Terminal Color

March 21st, 2012 by leoganda No comments »

I was using linux ubuntu for my work now I’m using Mac OS X 10.7.3, I was surprised when I did ls command, the ls result returned had the same color for files and folders. Fortunately there is a trick to set ls command with colors.

Create or edit this file

~/.bash_profile

Then insert this inside it

export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad

Save it, now open your new terminal instance.

PHP Date Timezone error ( date_default_timezone_set )

December 9th, 2011 by leoganda No comments »

I was experiencing an error regarding date() function on PHP 5 with error message like this :
Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Jakarta' for 'WIT/7.0/no DST' instead

For quick fix in PHP5, add this line

date_default_timezone_set("Asia/Jakarta")

[HD] Only Exception by Paramore – Live Concert at Jakarta August 19th 2011

August 20th, 2011 by leoganda No comments »

Paramore was doing great performance in here, love them so much!