Gerrit is wrong. Gerrit is evil!

Gerrit is wrong. Gerrit is evil. Gerrit is the beginning of all hell! If you’re considering using it as version control system, you’re most likely out of your mind! And you’re asking yourself for a big troubles. If you’re forced to use it (like I was), then believe me… your worst nightmares are ahead of you. Nothing, you seen in code review or version control systems up until now, hasn’t prepared you for the pain you’re about to suffer…

Read More “Gerrit is wrong. Gerrit is evil!”

Change could not be merged because of a missing dependency

Gerrit is hard. If you found Git (behind Gerrit) hard to understand and operate, then don’t worry — the real hell is still before you. And one of the biggest Gerrit newbies’ nightmares is situation, when Gerrit is unable to auto-merge particular change, showing “Change could not be merged because of a missing dependency” message. This mostly happens, when you abadon another change, on which current change depends.

Read More “Change could not be merged because of a missing dependency”

Digital Ocean’s introduces AMS2 datacenter

Digital Oceans has officially opened new AMS2 datacenter in Amsterdam. This event forced me to do some small tests on quality of services, from my own (Poland’s perspective) point of view.

I’m not talking about Quality of Service, because this is beyond any discussion. With standard (simple to answer) tickets being answered with 3-5 minutes (!!!) and with more complex cases solved with 3-5 hours, Digital Ocean’s set itself a new world-standard. I have never found or met support of this scale.

So, if we’re not talking about QoS, lets talk about performance.

Read More “Digital Ocean’s introduces AMS2 datacenter”

Push local repo to a new remote with all branches tags and all the history

Since both me and my boss / admin are kind of newbies to Git and since our both vision on how application structure should look is a way different, we quickly did a quite pretty mess in our main repository and got lost a little bit! :] After some short talk, we agreed on one thing (at least). We need to make a new, clean Git repository and push everything from my local repository to it.

This brought us to a question, how to do this? After a short googling, I found these Stack Overflow questions:

but none of them gave me a quick-and-dirty answer (or: checklist) on how to do this, without too much read.

So, I decided to write my own. Once again, Git turned out to be much better and much easier than SVN.

Read More “Push local repo to a new remote with all branches tags and all the history”

Use your custom TTF font cross-browser

I had some troubles with Font Awesome library and found solution for them in this Stack Overflow answer.

It also contains links to on-line services for converting .ttf files (officially supported in CSS3 only) to .eot, .svg and optionally to .woff, to make your TTF font supported in a large variety of web browsers:

After conversion use CSS styles as in mentioned answer to get all things working together.

TortoiseGit asking for password on password-less login setup

After months of uninterrupted password-less work, my TortoiseGit started to ask me for a password on some of my remotes, when pushing / pulling. I’m seeking a solution to fix this, as this can drive me crazy. I haven’t found a good fix so far, so don’t treat this article as an ultimate solution. Nevertheless, you can get a quick check-list out of this text to see, what I’ve managed to find out so far.

Read More “TortoiseGit asking for password on password-less login setup”

Git did not exit cleanly (exit code 128)

Probably the most popular error in TortoiseGit is:

git did not exit cleanly (exit code 128)

And all, it tells you, is that something was wrong when calling git.exe internally.

Right… That’s pretty not much, don’t you think?

Well, this StackOverflow question may help you, at least in certain situations. It has 14 answers (from dumbest, like not updating program to newest version) to quite interesting one. This could be a good starting point, before looking somewhere else.

Google Drive for Windows does not sync anything

I had a problem on my Windows 7 x64, that Google Drive for PC was was not syncing anything, when these two factors occurred:

  • a default setting of Automatically detect proxy settings was checked,
  • local Google Drive folder was set in root of a disk (i.e. D:).

Changing Automatically detect proxy settings to Direct connection and moving local Google Drive folder to C:\Google Drive solved problem and files started to sync immediately.

Read More “Google Drive for Windows does not sync anything”

Add sounds and speach to your website or application

Most websites are developed without sounds and if there are any sounds inside then they’re most likely coming from some videos and they’re not single click-like or notification-like sounds, known very well from desktop applications. The same goes for many mobile application, as sounds are mostly found in mobile games.

But, if you do need something like click sound, tick sound or any notification-like short sound, then this article lists some most famous, yet free sites, from where you can get as many such sounds as you need.

No code here, sorry! Refer to other sources on how to embed sound within website or mobile application.

Read More “Add sounds and speach to your website or application”

Get WebSVN to QNAP

This guide assumes, that you have svn already installed on your QNAP, fully configured and working like a charm, and you just want to enhance it with web client (WebSVN). You can use this guide also on any other server, than QNAP, but keep in mind, that it contains some QNAP-specific problems.

Keep in mind: WebSVN (as good as all other alternatives mentioned in the end of this text) are read-only web SVN clients! You can do a lot of useful stuff on your repos, but forget about committing or anything similar that requires write access or changing repository structure.

Read More “Get WebSVN to QNAP”

Setting up password-less connection in Git Bash or cmd

All right, we’re after Setting up password-less connection in Netbeans and Setting up password-less connection in TortoiseGit, now it is time to do the same in “pure Windows”, that is: to be able to establish password-less connection with any Git-based repository in command-line (both cmd and Git Bash).

If you were using your repo in Netbeans and/or TortoiseGit painlessly, but each attempt of doing the same in console, ends up with annoying message:

Disconnected. No supported authentication methods available (server sent: publickey)

then you’re in right place to get help.

Read More “Setting up password-less connection in Git Bash or cmd”

Setting up password-less connection in Netbeans

Following Setting up password-less connection with GitHub in TortoiseGit article, here are tips on how to setup password-less connection between your GitHub account and your local repository operated under Netbeans. The easiest way to setup password-less connection, is to do this on initial GitHub repo clone or pulling. And it will be presented this way, in following article.

Read More “Setting up password-less connection in Netbeans”

Every HTML 5 tag can be used as reference

Remember, that every HTML 5 tag can have id and can be used as reference. Every one!

So, if you want to display some bolded value, then instead of writing:

<span>Cars: <span id="carsValue" style="font-weight: bold"></span></span>

you can use much simpler approach of:

<span>Cars: <strong id="carsValue"></strong></span>

Increasing `loadUrlTimeoutValue` to avoid `Connection to server was unsuccessful` error

If your PhoneGap application loads some external content (either local files or any server-side data) using AJAX, keep an eye on the fact, that on very slow mobile devices, it may end up with error message saying, that connection to given URL failed. Which means a typical timeout.

You may experience the very same issue, if you’re building apps in debug mode and debug server (either yours or default weinre one) is down or responds to slowly.

Read More “Increasing `loadUrlTimeoutValue` to avoid `Connection to server was unsuccessful` error”

Doubled canvas drawings on Android with hardware acceleration enabled

There is a bug in HTML 5 Canvas object exposed on Android platforms, in versions 4.1.1 till 4.3 (newest, as of writing it, though not yet fixed). It causes that, when hardware acceleration is turned on, any drawings on canvas will be doubled at top of the page.

At first, I thought, that this is caused only in Segment Display — a fabulous JS library, that I use. This is why, you’ll find a lot of references to it in this article. But then it turned out to be general Android problem, that appears not only in PhoneGap applications (which uses webview), but also in all pages served on Android 4.1.x+ platform.

So, you’ll also find some ideas, how to work around this problem, if you’re not using Segment Display.

Read More “Doubled canvas drawings on Android with hardware acceleration enabled”
source code

PhoneGap apps must use domain whitelisting to access external resources

If your PhoneGap application loads some external content via AJAX, keep in mind that you have to include domain whitelisting in your config.xml.

PhoneGap is very strange about this, from version to version and from platform to platform, and sometimes allows you to access external resources without domain whitelisting (I had that issue, that this worked on Android 2.x, but failed on 4.x). So, to be sure, add it to every new project.

Read More “PhoneGap apps must use domain whitelisting to access external resources”

Can’t install any application from Google Play

If you’ll ever get some cheap Chinese crap, called tablet, you may face up a strange issue. Though device is most likely equipped with Android 4.0 or newer, it still has old Android Market (not Google Play) installed. Opening Android Market does not perform automatic update to Google Play. And attempt to install any application ends with hang-up. If you’re experiencing this or similar problems, you may find solution here.

Read More “Can’t install any application from Google Play”

Detecting if PhoneGap application is run under Ripple Emulator

As of writing this, Ripple Emulator itself is old, long-time not updated. But, what is much more wrong, it has very, very old version of PhoneGap behind. Currently it is based on version 2.0.0, while we already have version 3.0.0 in local PhoneGap building and 2.9.0 in PhoneGap Build. If you compare PhoneGap API reference from version 2.9.0 with the one inside Ripple Emulator, you’ll see that changes are dramatic. That’s why being able to detect, when your application is running in debug mode (i.e. under Ripple Emulator) is essential.

Read More “Detecting if PhoneGap application is run under Ripple Emulator”

Get language name and ISO code based on native language name

For one of my PhoneGap project’s I needed a function that will convert local (native) language name into international (English) language name. And another one that will return correct two-letter language code (ISO 639-1), again, based on native language name. This was required because PhoneGap applications are returning local name for currently selected language (so, you’ll get polski instead of Polish, Tiếng Việt instead of Vietnamese and so on).

Here are these functions for future reference and for others, who could possible find them useful.

Read More “Get language name and ISO code based on native language name”

Setting up password-less connection in TortoiseGit

Both mysysgit and TortoiseGit are password-less in the meaning, that they don’t store any passwords. If you want to avoid typing your GitHub login password and over and over again, the only option is to setup password-less login using SSH keys. This article is my personal check-list on how to configure each computer as painlessly as possible.

Read More “Setting up password-less connection in TortoiseGit”