Linux, WebDev and other…

Deploy symfony app on shared hosting

Simple list of steps, which I have done to get symfony app working on a shared hosting.

Phalcon, PHPUnit and database

I am currently writing a REST API in Phalcon PHP framework. Database is mostly handled by ORM, but I also created few repositories for complex queries in raw SQL. Mocking all of this is very problematic so I decided to run tests on additional, test-only database. This database is populated by initial test data, which is […]

, , , ,

Symfony form & doctrine – UniqueEntity validation and field not editable by user

Simple thing. One to many relation. (In my case: User to Sport).  User can not have related duplicated entries. (but entry name can be duplicated if different user) I’am working with symfony only few days and wasted some time on this easy task, so I writed this note.

Confirm form submit using bootbox modal for Laravel resource deletion

I’m currently playing with Laravel and it’s resourceful controllers. Resource deletion is made by DELETE request (which, by the way, is not available from HTML forms and it’s actually POST with “_method” key). So delete button must be submit button wrapped in form. I wanted to add customizable confirm question for resources deletion using bootbox plugin. […]

, , , , ,

TCX workouts map

I wanted to put all my workouts from endomondo on single map. First, I exported all workouts as TCX files using endomondo-export python script. Then, I created this simple tool to visualise workouts on google maps.  Tools and technology Google Maps Javascript API was used to render workouts Jquery was used for TCX parsing and DOM […]

, , , ,

Convert single mysql insert statements to one statement with multiple VALUES lists

I needed to convert multiple mysql insert statements to statements with multiple VALUE lists to insert several rows at a time. I have not found any tool for that, so I wrote this script in Python. Thankfully I found a non-validating SQL parser module for Python, so this task became very easy. You must install […]


Simple daemon wrapper script in bash

I needed to run quick  PHP script every 15 seconds. Cron job cannot be used to run tasks more frequently than one minute. This simple script based on this will do the trick. Can be used on servers with shell access without root permissions. Changelog: 2014-10-29 Added pid check

, ,

Phalcon 1.3 with nginx on debian 7

Copy/paste guide for installing nginx with phalcon 1.3 on clean  debian 7

, , ,

OpenCV in Android (OpenCV4Android) without camera preview

This is an example activity for using OpenCV in Android without camera preview (e.g. for manipulating images on sd card). It checks if opencv manager is installed using BaseLoaderCallback. Don’t forget to add opencv library in Project Properties => Android => Library.

, ,

Google Maps – handling huge amount of markers

Problem We have a huge amount of markers and we want to display it to user using google maps.  Solution use ajax requests to fetch markers only for area visible by user display message “please zoom in”, if we have too many markers (let’s say that limit is 500) use MarkerClustererPlus to display fetched markers […]

, , ,

Previous Posts