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.

 

Head Tracking Home Project

September 22nd, 2012 No comments

I am a big fan of X-Plane simulator so I am trying to improve it over time for better experience. I added orthophotomaps to it which increased realism and detail.

After some time, I got an idea to control pilot’s head by using iPhone gyro. Head movement is useful mainly for navigation training. You would put the iPhone on your head and it would read gyro changes, send it via wifi to running X-Plane instance and move pilot’s head as you move yours. I tried to build the first prototype but then realized how bad iPhone gyro is. When I run the app for the first time without moving the device, the system started reporting error gyro data immediately. I did several corrections and filtering but still it was not usable for head tracking purposes.

I finally classified this as “bad” and was thinking about an optical solution. Then I came across TrackIR but I did not want to wait for it to be imported to my country so I decided to make something similar on my own (hardware, x-plane plugin and software). And after 3 days I had the first working prototype. :) Photos soon.

Categories: Uncategorized Tags:

SQLite3 iOS compilation error

September 22nd, 2012 No comments

For those having the following error trying to compile sqlite3 big source file

sqlite3.c: In function returnSingleInt:
sqlite3.c:88236: internal compiler error: in find_src_set_src, at var-tracking.c:1922

Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

The solution is easy. Just use llvm-gcc compiler for compilation instead of Apple gcc.
Changing Apple compilers helps sometimes…

Categories: Uncategorized Tags:
deadly laser