Archive for December, 2012

Pycharm exclude files from beeing synchronized

0

When running on a slower system or laptop synchronizing can take some time when you have a lot of binary files. The solution is to exclude them.

Settings -> Deployment -> Exclude items by name:
For example:
.svn;.cvs;.idea;.DS_Store;.git;.hg;*/DbaseAssets/Images/*;*/DbaseAssets/Sounds/*;*/builder/*/App

Raspberrry-pi as mediacenter

0

image

Raspberry over clocked to 800 with xbmc. Media center for 30 euros 🙂

Kivy on android https support. Part2

0

I still was unable to connect to http(s) from an android device and after some test cases with simple xmlrpc server/clients I noticed I’ve got socket errors claiming that I have no permission to use sockets.
So the real fix was to build the package with “–permission INTERNET”.
Now I have proper http(s) support 🙂

Something todo for Christmas :-)

0

image

Building a kivy app for Android issues

0

When making a kivy app for Android I came across some issues and while I informed the kivy devs I just put them here also just in case I need them later 🙂

Just follow the manual for packaging for Android.
First of all when you install the dependencies you must use python-pip iso pip.
When building the python binary I had problems with the httplib module which did have https support.
This what adb logcat told me:
I/python (19347): your version of httplib doesn’t support HTTPS

As it turned out the order in which you build the various modules matter.
So when building the Python binary you must use the order.
Put C lib first, then python lib, then kivy.
eg ./distribute.sh -m “sqlite3 libxml2 pyopenssl pil kivy”

Now there’s HTTPS support.

When you still haven’t HTTPS support try to clean the python4android git tree.
git clean -dxf

More android specific stuff I encountered:
To write to the filesystem use CWD/.kivy/….
sys.platform is on android ‘linux3’ (GNU/Linux is ‘linux2’)

Eclipse change the tooltip colors on Ubuntu 12.04

0

Found an excellent post on ‘Ask Ubuntu’:
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity

And in addition to the tip in the above post I copied the whole Ambiance theme into my home directory as I also have eclipse installed in my home directory which lives on a external HD so I have always a proper theme “with me” 🙂

Excluding files in git and egit on eclipse

0

This is not rocket science but more a reminder for myself 🙂

When working with eclipse and the egit plugin I noticed that a ‘git refresh’ would take minutes in certain projects. The particular project has a few directories containing 10000+ .ogg and .png files which are not included in the git repo. I have git exclude files and global .gitignore files in place but egit seems to ignore them.
So I added the file patterns to the egit ‘Ignored Recources’.

(For example I want to exclude everything in my */lib/Sounds)
Open Window -> Preferences -> Team -> EGit -> Add pattern
The pattern to add: */lib/Sounds/* (duhhh)
Push ‘apply’ and presto, the refresh just takes seconds 🙂

Just for completeness I include my .gitignore_global, the relevant parts and the projects exclude file.
To have the git global ignoring stuff do: git config --global core.excludesfile ~/.gitignore_global

.gitignore_global:
# Custom stuff
*.project
*.pydevproject
*.settings
*.pyc
….
….

The .git/info/exclude file:
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
builder/BtpOS/*/Data/
lib/CPData/DbaseAssets/Images/
lib/CPData/DbaseAssets/Sounds/

Go to Top