Month: August 2013

  • Solve .gitignore not ignoring .classpath & project.properties in Windows

    I have this small problems when Git not obeying .gitignore in Windows. It’s keep adding .classpath and project.properties. To solve this problem: 1git update-index –assume-unchanged <file>

  • Mysql drop all databases

    Here is a quick mysql script to drop all databases except test and information schema : Go to mysql command-line and execute this : 1select group_concat(concat(‘drop database `’,SCHEMA_NAME,’`;’) SEPARATOR ‘ ‘ ) from information_schema.schemata where SCHEMA_NAME !=’mysql’ and SCHEMA_NAME !=’information_schema’;

  • Solve Java Application killed / closed in Ubuntu 13.04 Raring

    After update Ubuntu 13.04 Raring, suddenly all Java based application like LibreOffice, Aptana, Eclipse, Netbeans get killed / closed without any-reason. To solve this : 1sudo apt-get remove libwebkitgtk-1.0-0 Kudos to : http://daddycat.blogspot.com/2013/05/when-eclipse-is-killed-after-ubuntu.html

  • Django Admin read GET params and set value object in add form

    Here is quick snippet to read GET params value and set add form value by it’s GET value 12345678910111213class PhotoAdmin(admin.ModelAdmin):     …     def add_view(self, request, form_url="", extra_context=None):         data = request.GET.copy()         if request.method == "GET" and "item_id" in request.GET:             […]