How to make RaspberryPi truly read-only, reliable and trouble-free

December 4th, 2014 87 comments

RaspberryPi is a nice, small device which can be used for various automation purposes, internet of things or as an advanced camera. I have been using 5 RPis as a camera with motion detection and post-processing. This application requires high reliability and it was a pretty long journey until all the issues were solved. Here I am writing the most important things I have learned so you don’t need to go through the same stuff again (my cameras were placed on a remote location, making the whole process more complicated).

Read more…

Categories: Electronics, Server stuff Tags:

Reverse-Engineering DVR Protocol

July 19th, 2014 No comments

Just a quick report of me trying to find out how DVR sends video data to the viewer over the network.

Read more…

SSD Drive Failure on Mac

March 15th, 2014 No comments

All of a sudden my Mac Mini froze and all I was able to do was to move the mouse cursor with spinning beach ball. I tried restarting, but the same thing happened a few minutes after booting. I figured out it was an SSD disk problem but decided to describe it in more details here.

Read more…

Categories: Uncategorized Tags:

Automatically converting binary plists to xml1 in vim

December 1st, 2013 No comments

Just a quick vim configuration suggestion to auto-convert bplist to xml1.

Add these lines at the end of your ~/.vimrc :

” convert binary plists to xml1
autocmd BufReadPre *.plist set autoread
autocmd BufReadPre *.plist silent !plutil -convert xml1 <afile> 2>&1 >/dev/null

Categories: Uncategorized Tags:

Connecting an RS-232 device into Raspberry Pi

November 20th, 2013 2 comments

I own a VHF scanner Uniden UBC3500XLT and I wanted to control it remotely via its serial interface and Raspberry Pi. That task was not as easy as I expected it to be. :)

Read more…

Categories: Electronics Tags:

Debugging on iOS and Getting Crash Reports Over the Air

August 24th, 2013 No comments

When debugging software on iOS, especially jailbreak tweaks, it it very useful to know how to debug them.
In this short article I am going to explain how I do it.

Read more…

Categories: Uncategorized Tags:

A few notes about nginx

July 30th, 2013 No comments

Nginx is a great, fast HTTP server but I often stumbled upon some problems when configuring it. Mainly because the fact that official documentation is not concrete and clear enough.

That’s why I decided to write down some notes and experience I gained during nginx usage. Some of comments mentioned here may become obsolete or may not be true completely, but this is what I used and what worked for me.

Read more…

Categories: Server stuff Tags: , , , ,

Parsing XML and HTML using Perl and LibXML

May 31st, 2013 No comments

I used to parse HTML data using regular expressions and XML documents using xml parsers which normally parsed documents into arrays and hashes (key-value pairs).

But this time, I needed to retrieve only specific nodes of an XML document with some specific attribute. To do this, I could retrieve all nodes and then go through all records and use some conditions to get only those I am interested in or use some clever, modern solution. And this is where libXML stepped in.

Read more…

Categories: Programming Tags: , , ,

Using Regular Expressions

November 10th, 2012 No comments

In my opinion, regular expressions are one of the most useful things in general programming and are one of my secret weapons. I use them very often for parsing data from web pages, parsing out language strings from game code (for internationalizing the game), modifying and processing text files, processing output of various utilities like the “svn” terminal client. I mostly use Ruby or Perl for these as they offer various other cool features for text processing (and Perl is super-fast as well).

Read more…

Categories: Programming Tags: , , , ,

GameCenter error “The requested operation has been cancelled.” explanation

October 26th, 2012 No comments

This post is dedicated to iOS developers.

When using the following method:
[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:…]

You may get “The requested operation has been cancelled.” error while trying to authenticate the user to the GameCenter.

Don’t worry. This happens after you cancel GameCenter log in request three times and click to “Disable GameCenter” button. You may have done that during testing.

To make it working again, just open GameCenter app and sign in there.