CategoryCode Snippets

Simulate CPU load with Python

While testing out some home automation code on my Raspberry Pi I noticed it was pretty CPU intensive. Time to bump up the overclock to squeeze more performance out of the Broadcom Arm7 processor. I wanted to keep an eye on temps as well as stability under full load so I needed to simulate CPU usage.

Continue reading

Executing PHP within a WordPress text widget

I was looking for a way to add a dynamic check of the status of my Raspberry Pi to the sidebar of my website. A quick search of the WordPress plugin directory returned a plugin that would allow me to execute PHP code from within a text widget. Perfect for what I was thinking; A simple ping test to drive the dynamic text.

Continue reading

Running Wireshark over SSH (Windows)

I recently came across and issue that required the use of Wireshark. Unfortunately I did not have access to install this on the remote linux host. No probelm, luckily it’s easy to route tcpdump over SSH to Wireshark on my local Window machine.

You will need:

  • Wireshark (obviously)
  • Putty
  • Plink
Continue reading

Raspberry Pi: Re-enable DS18B20 GPIO for kernel v3.18.5+

I noticed that the DS18B20 temperature sensor had stopped working correctly after upgrading the kernel on the Pi. Not to worry, the fix is simple.

Continue reading