# Computing

## Solving Suko with pysmt

In a waiting room this week I opened a newspaper to find the following puzzle, named “Suko” (a trademark of Puzzler).

Various approaches exist to solving them manually and it’s possible to play online. However they are an excellent candidate for an SMT solver so I decided to implement one using pysmt.

## libnids on 64-bit architecture machines

A quick note for anybody using libnids on a 64-bit machine (AMD64), you will need to compile with -fno-strict-aliasing if you use optimisation at -O2 or above. Without it libnids will silently fail to provide you any data.

## Logic Friday

Today I wanted to quickly calculate a truth table for a simple boolean equation. Whilst this can be done very simply on paper it becomes tedious with lots of inputs.

A quick Google search found “Logic Friday”, available at sontrak.com. Boolean operations can be described using logic gates, truth tables or an equation.

## Goodbye, clamav

Today I removed clamav from my VPS, which was built into the mail service I run. There are a small number of users and a few thousand messages a week - I liked that I was probably offering some small protection to those people. However all have endpoint anti-virus and most are wise enough to know about malicious email attachments.

## Forcing SSL browsing in Apache

The Apache vhost configuration snippet below will force any non-SSL requests for a website to be rewritten to an HTTPS site instead. This is useful to ensure that clients cannot accidentally browse an insecure site, but they don’t have to remember or bookmark a particular URL. I use it for lionserver.co.uk, click the link to see it in action. ServerName secure.example.co.uk ServerAlias www.example.co.uk ServerAlias example.co.uk RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^/(.