Patrick's playground

Random thoughts, problems and solutions

Category: Operating Systems (Page 1 of 2)

TransIP Private Network eth1 not coming up

Today I encountered the issue where I added a VPS to a private network in the TransIP dashboard. I followed their blogpost on how to configure the internal IP address found here.

However, after running


I still didn't see the eth1 interface up. 

Read More

SQLSTATE[HY000] [2003] Can’t connect to MySQL server

A while ago I was in a project which had separate CentOS web server and database servers. I had whitelisted the IP addresses we were using so the machines could reach each other, but all other connections were dropped. One would expect that to be enough, but my requests returned me 'SQLSTATE[HY000] [2003] Can't connect to MySQL server'. Apparently SE Linux didn't want me to connect yet.

Read More

Monitoring Apache with Supervisord

Monitoring is great. Especially if it works and you don't have to take care of restarting the services yourself. Supervisord can make your life a little bit easier by doing this for you. It can monitor the processes you want on your server and (re)start them for you if they are not started. That is, if you play by its rules.
I was completely new to Supervisor (although I knew what it does) and my goal was to monitor the apache2 process on my server. In doing that I encountered some problems. This blogpost shows the summary of my journey and concludes with a working configuration.

Read More

Using SimpleAdapter for populating simple_list_item_2 with Strings

I don't know it it's my searching skills which are fading or the lack of examples, but I wasn't able to find a simple example on how to use the simple_list_item_2 which is built into Android. I've used some custom layouts to establish the same result, and sometimes some extras (display an icon on the right for example). However, now I wanted to use the built-in feature, but had to search quite some time. If you experience the same, hopefully this post will save you time.

Read More

Custom checkboxes for CheckBoxPreferences on Android

For an App I'm writing I need to use custom checkboxes in a PreferenceScreen. I want to use the CheckboxPreferences as it's designed for that. Many searches lead to StackOverflow, but caused me a stack overflow as well as they didn't work. In this (short) post I outline my findings and provide a working solution step by step.

Read More

Getting IPython readline and auto-completion to work on Mac OS X

It's taken me some time and a lot of web pages which tried to solve the readline support with all kinds of hacks, but finally I've been able to get readline support and auto-completion for IPython to work. As it can be quite confusing and hard to follow all posts, this will be a step-by-step approach to get things to work. Note that I've got it working on Mac OS X 10.5.7 Leopard. It is expected to work on Leopard at least. Other versions might not require the exact same solution.

Read More

Command line svn on Ubuntu

This morning I had 'some difficulties' with the Eclipse IDE and Subversive to restore my code to an earlier version. Subversion is all about this, so this should be pretty easy.... right? It seemed to be ok, I right-clicked the PyDev project > Replace with > Revision or URL and filled in the revision number. Eclipse started to do something. When it was done, the revision numbers of the files I wanted to revert (which were newer than that revision) were still the same. Did it work? I don't know. Talking about unexpected behaviour.. it prompts me if I really want to revert, but the revision number of the files stay the same.

Read More

Installing psycopg2 on Mac OS X

I thought I had psycopg2 installed on my mac.. Thought.. But now I actually have!

Read More

Installing Numpy on Mac OS X 10.5.x Leopard

Installing Numpy according to the Scipy wiki page can be a real pain. As Python and GCC are already part of Mac OS X, some prerequisites are already fulfilled, but an official install didn't do the trick in my case.

Read More

Syntax highlighting for Vim

Today I was looking for syntax highlighting for Vim on Mac OSX (10.5.6). A lot of sources only tell which rules there are to enable this, but a lot less tell where to add / edit these rules. I found this source to be very useful to do this. The first comment on the post is also very useful. By adding just two lines to my configuration file I had a nice highlighting with bold characters.

In short:

Read More

Page 1 of 2

Powered by WordPress & Theme by Anders Norén