Bouni's blog
random bits and pieces
locale-gen fails on raspberry Pi
2013-12-12
I’ve tried to generate the locales on my Raspberry Pi, but i ran into a problem that i was not able to solve for a few hours.
1root@rpi: ~$ locale-gen 2Generating locales... 3 en_US.UTF-8.../usr/bin/locale-gen: line 41: 303 Killed 4localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias 5$locale locale gave me another error
1root@rpi: ~$ locale 2locale: Cannot set LC_CTYPE to default locale: No such file or directory 3locale: Cannot set LC_ALL to default locale: No such file or directory 4LANG=en_US.UTF-8 5LC_CTYPE="en_US.UTF-8" 6LC_NUMERIC="en_US.UTF-8" 7LC_TIME="en_US.UTF-8" 8LC_COLLATE="en_US.UTF-8" 9LC_MONETARY="en_US.UTF-8" 10LC_MESSAGES=C 11LC_PAPER="en_US.UTF-8" 12LC_NAME="en_US.UTF-8" 13LC_ADDRESS="en_US.UTF-8" 14LC_TELEPHONE="en_US.UTF-8" 15LC_MEASUREMENT="en_US.UTF-8" 16LC_IDENTIFICATION="en_US.UTF-8" 17LC_ALL= But finally i found the solution in an inconsiderable forum post. The reason for the locale-gen error is simply not enough RAM!
Good bye Arduino IDE
2013-12-11
I’ve worked with the Java based Arduino IDE for a long time now, and always thought that i miss the comfort of vim. But for soom reason i never searched for an alternative, but yesterday i had enough of that shit piece of software!
Ino 🔗So i googled a bit to find an alternative and stumbled upon ino . After a few test i must say that ino is exactly what i was looking for :-) Take a look at the quickstart to see how easy it is.
Flask / Flask SQLAlchemy tipps and tricks
2013-11-15
I use Flask and Flask-SQLAlchemy for a while now. Doing so i spent a lot of time in searching for the solutions for different problems. See this as my notebook of helpfull snippets. I will update this post from time to time because i don’t want to create a new blog post for each line of helpfull code.
Leaflet and Leaflet.draw save and restore
2013-11-12
I work on a project that has a form including a map, so a logged in user can enter his data and drawing features on the map and save it afterwards. The user gets a page that shows the map with the features on it. I will show how to save and restore the drawn data as geoJSON and how to save circles because that type of feature is not supported by geoJSON.
News on my MDB projects
2013-11-10
Because i’ve got a lot of emails during the last year with several questions about my MDB projects, i try to answer them here.
HTML5 ajax file upload with flask
2013-06-26
Making web uploads less painfull 🔗For one of my current Flask projects i want to have a nice looking and easy to use file upload form. That means no input type="file" form field where i have to select each file and the upload it on at a time. I came across this nice tutorial for a HTML5/jquery file uploader, but the backend is written in PHP. So I decided to try to get this working with Flask and it was easier as I supposed :-)
Comments activated
2013-04-24
I finally activated the Disqus comment system for my blog. I wanted to do this for a while now but was to lazy to do it :-)
Call functions out of jinja2 templates
2013-04-24
I do a few webprojects with Flask and I love it! While creating a template i searched for a way to call functions from within the template, and found out that i can use a @app.context_processor decorator.
A new eccentric tappet for the pcb drill
2013-03-26
The problem 🔗I have built a PCB drill that works nice most of the time, but sometimes it occurs that the stepper motor don’t perform a full turn.
This is caused by the friction of the eccentric tappet. I’ve simply made it out of a piece of steel rod, with a hole outside of its center. That tappet pushes a brass screw upwards. I thought that this will work fine, but it does not (sometimes).
The MDB protocol [part 4]
2012-07-17
I just want to announce that i’ve published my MDB cashless device code for the MateDealer project on github. It would be nice to get some feedback!
Here is the github repo