Month: August 2012

Solve add partition in etc/fstab in Debian not being mounted

Solve add partition in etc/fstab in Debian not being mounted

I use Hpcloud with Debian Image on Small instance. As usual, I load additional/extra hardisk into another folder in filesytem (/var for instance). But somehow it’s doesn’t works at all. Here are the steps and solutions: 1. Check partition You can check all partition device by : 1fdisk -l For example: 1234567891011121314151617181920212223242526Disk /dev/vda: 10.7 GB, …

+ Read More

How to disable add / view links in Django Admin

How to disable add / view links in Django Admin

This is most simple steps that frequently used when we want to showing Log / Histories of Models in Django Admin. Sometimes we don’t want to give detail/view links for record Models in Django Admin. We can disable them with : 12345678class InsuranceHistoryAdmin(admin.ModelAdmin):     """Paypal History Logger"""     list_display = (‘id’, ’email’, ‘activation’, …

+ Read More

Solve Ipython in Django Shell_Plus AttributeError: ‘module’ object has no attribute ‘Shell’

Solve Ipython in Django Shell_Plus AttributeError: ‘module’ object has no attribute ‘Shell’

Python manage.py shell_plus is a powerfull-tools that we will load all application from settings.py in Django. We no longer need to doing manual import to access some models. Ipython also another grandioso tools that provide best coloring syntax. Combining this both tools will made our day happy. But, sometimes you facing this problem when running …

+ Read More

Install Fedora 17 in Mac OSX with Macbook Pro

Install Fedora 17 in Mac OSX with Macbook Pro

1. Setup Wireless Driver Broadcom By default, Fedora will not detect your Wireless. You need to install broadcom-wl from rpmfusion by : 123su -c ‘rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm’ sudo yum update sudo yum install broadcom-wl For manual download because you don’t have internet access : http://download1.rpmfusion.org/nonfree/fedora/releases/17/Everything/ 2. Install Development Packages 123sudo yum install make automake …

+ Read More

Setup Python and Django Environment in Fedora 17

Setup Python and Django Environment in Fedora 17

1. Install Dependency Packages 1234sudo yum update sudo yum install alacarte git wget vim lsb sudo yum install make automake gcc gcc-c++ kernel-devel sudo yum install python-devel libevent-devel python-pip bash-completion 2. Setup MySQL 1sudo yum install mysql mysql-server mysql-devel Run MySQL at startup : 12sudo systemctl start mysqld.service sudo systemctl enable mysqld.service 3. Install Virtualenv …

+ Read More

Setup Synergy Server and Client Multiple Screen in Fedora Core 17

Setup Synergy Server and Client Multiple Screen in Fedora Core 17

Working with 2 laptops and have to connected between each other is important in my daily activities. I have two Fedora laptop here (Macbook Pro + Dell) and get connected seamlessly with synergy. Here are to setup : 1. Install synergy In both computer, please install synergy by : 1sudo yum install synergy 2. Hostname …

+ Read More

Downgrade from Sun Java 7 into Java 6 in Fedora Core 17

Downgrade from Sun Java 7 into Java 6 in Fedora Core 17

Sometimes we have some software that buggy in Sun Java JRE / JDK 7. Then it comes to us to downgrade into 6 Version. Well, isn’t difficult. All you need to do is following this step. 1. Download Oracle Sun Java JRE / JDK 6 Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and download RPM BIN version. 2. Uninstall …

+ Read More

Install and Fix PIL Python Image Library with JPEG support and ZLib in Fedora 17

Install and Fix PIL Python Image Library with JPEG support and ZLib in Fedora 17

PIL default installation using PIP doesn’t come with JPEG and ZLIB support in Fedora Core 17. So, that why you sometimes facing problem when doing image processing using PIL in Fedora. The solution is easy: 1. Uninstall PIL 1pip uninstall PIL 2. Install depedency packages 1sudo yum install libjpeg libjpeg-devel 3. Make Symbolic Link if …

+ Read More

Set initial value in fields Django Admin form

Set initial value in fields Django Admin form

Sometimes we need to setup different initial data when user create new records in Django Admin. Well, when you came at this page, I believe you already search through a lot of web pages and doesn’t see the solution, isn’t ? 😀 For instance, I have Order Model like this : 123456789class OrderInfo(CommonInfo):     …

+ Read More

Cannot import name abbrtask in Django Celery / Celery Python

Cannot import name abbrtask in Django Celery / Celery Python

When you facing this error : 1cannot import name abbrtask or 1celery.utils import abbrtask That’s meaning youre using some python modules that rely on Celery 2.5.5 version. To solve this issue : 12pip uninstall celery pip install "celery<3.0" And your headache shall gone 🙂

How to doing memory debugging and profiling in C with Valgrind

How to doing memory debugging and profiling in C with Valgrind

When we playing with C, memory debugging and profiling is a basic need to “break” and doing “analysis” to our C program. Valgrind is a good tools to help us doing memory debugging and profiling. In this case, I use Ubuntu 12.04. First, we need to install Valgrind by : 1sudo apt-get install valgrind Next, …

+ Read More

Solve ‘Order total is invalid.’ (Error Code: 10401) for Paypal error with Django/Python

Solve ‘Order total is invalid.’ (Error Code: 10401) for Paypal error with Django/Python

When I doing Paypal Checkout with multi-currency like Taiwan or Japanese Yen , suddenly I get this error : 1’Order total is invalid.’ (Error Code: 10401) Wait a seconds, I try with other currencies like USD or GBP, everything is works well! Then I realize that some currencies in Paypal can’t handle comma in Decimal …

+ Read More

Setup Python and Django working environment in Mac OS X

Setup Python and Django working environment in Mac OS X

Here is a quick way to setup python and django on the fly in Mac OS X Snow Leopard. 1. Python 2.7 It’s better to use stable / latest Python version for development. At this time, I use Python version 2.7.3 for development. You can grab this at http://www.python.org/download/releases/2.7.3/. Just click on .dmg files and …

+ Read More

Setup working environment Blackberry in Mac OS X Snow Leopard

Setup working environment Blackberry in Mac OS X Snow Leopard

Develop Blackberry application under Windows is easy rather with Mac OS X. Again, I only develop application under Linux or Mac OS X. To setup and develop blackberry application in Mac OS X is need a patience. Here are the step to do: 1. Download and Install Latest Xcode We need Xcode installed eventhough Blackberry …

+ Read More

Solve sudo chmod / chown not permitted in Mac OS X

Solve sudo chmod / chown not permitted in Mac OS X

When you dealing with external files or copy files into your hardrive in Mac OS X, I believe you facing this issue “Unable to change files” or “Operation not permitted”. Even you already use “sudo” but you don’t permission to change permission or owner for this files. This is happen when we dealing with files …

+ Read More