Feeding data to Flightradar24 using DVB-T stick. Part 1. Hardware

So… you want to have a Flightradar24 Premium account for free or you want to make the world better and you decided to start feeding data to this service, right? Well, great! But, information provided by FR4 about installation, configuration and feeding process itself have a lot of crappy and irrelevant parts. So, I decided to write my own mini-serie of articles on how to start, what to purchase and what to look for. So you can avoid all the pitfalls I felt into.

IMPORTANT! Read the next article, about software BEFORE you even plug your DVB-T stick to USB port. If you do this, you’ll waste some additional time on uninstalling Windows drivers, which are completely useless in this scenario (since we want to receive flight data, not the actual TV signal, right).

Read More “Feeding data to Flightradar24 using DVB-T stick. Part 1. Hardware”

Plural formula in PHP to evaluate ending for a number in Polish language

Providing correct plural form of countable words in English is easy, because there is a difference only between one (1 item) and other (0 items, 2 items, 5 items etc.).

In Polish (and some other languages) this is much harder, because Polish has two different plural forms and plural form of countable words is way, way more complicated and based sometimes not only on whole number but also on last digit of this number etc.

Read More “Plural formula in PHP to evaluate ending for a number in Polish language”

Text truncating function that secures both HTML tags and full words

Akshaya K Sahu’s answer to this question at Stack Overflow is a great example of text parsing function that can truncate any HTML-encoded string at given length, taking care of all the needed aspects, i.e.:

  • full words,
  • properly closed HTML tags and
  • respected UTF-8 encoding (double-byte characters!)

I have actually nothing to add to it, so I keep a copy of this code only for my own reference. And only because the original answer lacks some comments.

Read More “Text truncating function that secures both HTML tags and full words”

Legal user right to resell software purchased in EU

Software licensed under COA, OEM and similar licenses can be legally sold on European Union area, according to Court of Justice of the European Union’s verdict dated July 3, 2012. It judged that both private persons and companies can sold original software and licensees purchased from companies like Microsoft.

This judgement is a direct interpretation of the law of European Union directive 2001/29/WE, which says that producer’s law for an exclusive distribution ceases with the moment of software selling for the first time and producer or IT company cannot legally block any attempt of re-selling such software attempted by the person or company, who initially purchased it.

No contacts on Windows Mobile after adding Google account

If you have just purchased new Microsoft Lumia phone (or any other device, that uses Windows Mobile system), added your Google account to this device and you found out, that even though synchronization was successful, you have absolutely no contacts imported, then you’re in the same situation, as I was and this article should help.

Read More “No contacts on Windows Mobile after adding Google account”

Setting up new project in Gerrit

Because Gerrit is evil and wrong (see here for details), even such simple task,like creating a new project, requires a separate document and todo list.

Also, keep in mind, that you can’t delete a project through web GUI of Gerrit. This is most wanted and requested feature of this dully project management tool, but still hasn’t been implemented for years.

So, create your new project wisely, because you won’t be able to delete them, without playing around console, installing some third-party plugins or doing stupidities similar to this.

Read More “Setting up new project in Gerrit”

Why Panasonic Lumix DMC-TZ35 is a wrong choice?

When I decided to purchase a new digital camera, I nearly immediately felt in love with Panasonic Lumix DMC-TZ35. Mainly because its 20x optical zoom in a piece of hardware available for a reasonable price. I have purchased it and… nearly immediately returned it to the shop. I found some glitches. Not many, but serious enough to make shooting a photos with this device nearly pointless.

Read More “Why Panasonic Lumix DMC-TZ35 is a wrong choice?”

PhoneGap Audiobook Player. An abandoned project

I’m a an audiobook maniac. Listening to audiobooks requires MP3 player to have a special feature, which remembers last file/track played in a folder and last position within that file, for all folders, not just current one. This allows to listen to many audiobooks simultaneously, just as you’d be making bookmarks to a regular, printed book. All MP3 player, that I tested so far, hasn’t got than feature. Once you switched from folder/book A to folder/book B and then back to A, book/folder A was “reset” and play started from the very beginning. In this situation, I decided to write my own audiobook player in PhoneGap and release it as open source. Pity, but I failed to finish this project. Thus, I’m publishing only an unfinished sources and links to resources.

Read More “PhoneGap Audiobook Player. An abandoned project”

Completely remove file from local and remote (GitHub) repository

This is the short version of “Remove sensitive data” article in GitHub Help. And an alternative solution to the one presented [here](Remove file from repository and from all revisions.txt). It assumes, that you are the only collaborator to repository, so you can perform steps at once (you don’t have to contact others and wait until they rebase your changes) and that your repository doesn’t use tags, so you don’t have to perform all steps.

If any these two assumptions is not correct in your case, then avoid this article and rather follow to mentioned article. Keep in mind, however, that in some certain situations, you have to contact GitHub Support in order to finish entire procedure.

Read More “Completely remove file from local and remote (GitHub) repository”

An introduction to database migrations in Yii

If you’re new to Yii migrations, these sources might be a help for you:

  1. General information: Database Migration topic in The Definitive Guide to Yii.
  2. How to create initial migration basing on current database state, explains this Stack Overflow question and GitHub Gist (with InitialDbMigrationCommand class’ code) to support it.

To use migrations, you have to properly configure console version of your Yii application. Details follows.

Read More “An introduction to database migrations in Yii”

Undo last Git commit using git undo-commit command

There are probably thousands of websites telling you, how to undo the last Git commit. For example, one of the most voted up questions on Stack Overflow. But none of them (or actually nearly none of them) answers, how to do this using git undo-commit. Simply because, such command does not exist! :> Therefore, the title of this text should rather sound “Defining own Git alias to undo last Git commit“, since this article is focused on git aliases rather than on undoing last commit in Git.

Read More “Undo last Git commit using git undo-commit command”

Error 1618 when installing any software on Windows

You can find this error during for example Skype or Java Runtime Environment installation. And probably many more. It just means that another program’s installation is in progress and current one can’t continue.

It happens in most case, when you try to install some software, when Windows Update is installing heavy portion of updates. And current program can’t install or update some system elements, that are being updated by Windows Update in the same time.

Solution? Wait some time (until end of Windows Update process?) and then restart installer of your program.

Offline installer for Microsoft Office 2010 and other products

Microsoft has changed offline installation policy and you can’t download any offline installer, until you don’t provide your product key and you don’t login with your Microsoft account. If you don’t have it or you don’t want to use it, then the only option, you’re left with is to download offline installer from unofficial sources.

Read More “Offline installer for Microsoft Office 2010 and other products”

Differences between SSH key generated by ssh-keygen and Puttygen

There are some key differences between SSH keys generated by ssh-keygen and Puttygen so you may run into problems importing or adding keys generated by the latter one, while importing ssh-keygen‘s keys goes swimmingly.

Here are some tips on this problem. Of course, we’re talking about public SSH keys, as private one are secret and shouldn’t be added or imported anywhere.

Read More “Differences between SSH key generated by ssh-keygen and Puttygen”

Access Send To menu in Windows [updated]

No, you don’t need to install any extra program, to edit contents of Send to... context menu in Windows (source).

Instead, open any Explorer window and paste this as folder path:

%APPDATA%\Microsoft\Windows\SendTo

or hit Win+R, enter or paste shell:sendto and hit Enter.

This was proven to work in Windows 7 and 8. Most likely this works in Windows XP, Vista and 2000 as well.

[update] This still works nine years after writing this article, in Windows 10 and 11.

Make a webpage looking like terminal or command-line

So, you’d like to make a webpage that looks like terminal or command-line, right?

With a little bit of HTML, CSS and Javascript, it is as easy as snapping a finger. Note, that I underlined “looks like”, because we’re going to do just a look & feel. This will not be a full-blown command line interpreter, where you can enter commands and get results. It will only be a simple, cool-looking… thing.

This article is a slight port of the code that can be found at fludotlove.com (done by Nathan Marshall).

Read More “Make a webpage looking like terminal or command-line”

Fine-tuning CKEditor 4’s toolbar

Forcing CKEditor 4’s toolbars to look exactly as you’d like is a bit hard task. Somewhere in official docs it is said, that you should use config.toolbarGroups configuration settings for this purpose. This is, of course, a complete mistake.

Benefits are weak and you’re actually loosing all the control over which button, in which group and in which line of toolbar should appear. This article will help you design CKEditor 4’s toolbars exactly, as you wish to have them, using old, good config.toolbar-way.

Read More “Fine-tuning CKEditor 4’s toolbar”