From the Blog
How to fix RTL8111/8168B ethernet connectivity issues in Linux
The Issue This post could very well be titled “How to install Linux on a Lenovo IdeaCentre Q180.” It was the purchase of one of the Lenovo IdeaCentre Q180 devices that triggered my quest to find the solution to the data packet loss I was experiencing. The Q180 comes with Windows 7 pre-installed which is [...]
Read MoreChange the default text editor in Linux
I am not the biggest fan of the nano editor which is the default one in Ubuntu. I prefer using vim-nox and therefore I change the default text editor in my Ubuntu installs from nano to vim-nox as one of my first tasks after a fresh install. If you wish to do the same, run [...]
Read MoreTwig: How to var_dump variables inside a template
Do you sometimes wish you could just do a var_dump inside a Twig template while trying to debug some code? Well Twig comes with its own Debug extension to allow you to do just that. Firstly, add the following to your /app/config/config_dev.yml (you don’t want to do this on Prod): twig: debug: 1 services: debug.twig.extension: [...]
Read MoreSymfony2 Forms: How to render only the CSRF Token
Sometimes you don’t want to render all of the elements of a form using form_rest but you’re still required to render the hidden CSRF Token on a Symfony2 form. To render only the CSRF Token, use the following: {{ form_row(form._token) }}
Read MoreTwig: How to check if a variable exists
Use the following code to check if a variable exists within a Twig template: {% if theVariable is defined %}
Read MoreGenerate Symfony2 Documents in PDF
The Symfony site gives brief information on how to build the Symfony2 documentation, but I felt it lacked some of the finer details for anybody who might be new to reStructuredText documents. I decided to put up a blog post after trying to find a more detailed explanation and failing – I hope this helps [...]
Read More
Recent Comments