Mass modification of ID3 tags and MP3 filenames

I’m a puristic person and perfection maniac. Every of tens of thousands of MP3 files in my audiobook library must have a precisely filled up ID3 Tag and correct file name. For most operations on both tags and filenames, I’m using my own piece of software, written in Delphi years ago.

However, since it does not support operations on ID3Tagv2, I was forced to strip these tags manually, using “magical” key combination in Winamp (see below). But, for large set of files some batch program must be used. And here you’ll find short notice on some of them.

Read More “Mass modification of ID3 tags and MP3 filenames”

Images in GitHub’s wikis

GitHub is the best place (known to me) for doing a not-too-much-demanding management or collaboration of not-too-big projects. It offers you (of course!) repository hosting, powered by simple, yet effective bug and issues management and wiki pages for help or guides for your project. And the only problem, that beginners usually face, is hosting images for that wikis. GitHub allows you to upload images to issues in issue tracker and does all the dirty work of hosting them for you. But, a bummer appears, when it comes to images in wikis, because Add image button in any wiki page editor allows you to enter URL only and there is no way to simply upload them to your wiki.

Read More “Images in GitHub’s wikis”

Use custom ringtones in Microsoft Lumia phone

I’ve been struggling for hours to force my Microsoft Lumia 535 to display (and allow me to select) any .mp3 file as custom ringtone. Finally, this WindowsPhone.se answer solved my problems. However, there were some side notes and differences with my Lumia 535, that are not mentioned in this article, so I decided to write following post to further extend it.

Read More “Use custom ringtones in Microsoft Lumia phone”

Remove default search engines in Opera

This is a revised and updated version of this Super User answer on how to easily remove default search engines in Opera browser. By default they’re not editable or removable at all. Official statement is, that this feature was “forgotten”. But, we all know the facts, that Opera is being paid for keeping these default search available and making removal of them as hard as possible to the end user.

Read More “Remove default search engines in Opera”

Hide right sidebar in Adobe Acrobat Reader

If you’re annoyed with Tools / Fill & Sign / Comment right sidebar in Adobe Acrobat Reader (it is pretty useless, but still occupies a lot of space), then you can hide it with a simple trick.

Press Ctrl+H or select View > Reader Mode to enable Reader Mode.

This will hide all extra stuff (all toolbars and sidebars) except actual document area. If you would like to bring left sidebar (with navigation panel etc.) back, then simply press that keyboard shortcut or select that menu option again, to disable Reader Mode. Left sidebar should return, while right sidebar should remain hidden.

Purge Windows of private data when disk formatting is not an option

When I was hired by my previous employer, I was allowed to use office computer partially for private purposes, i.e. I was allowed to install Dropbox and use Google Chrome with my private account to sync all bookmarks and use password manager.

When I left this employer, to my surprise, I was refused to format system disk. And so, I have come with this short checklist or memo-like article of which steps should be undertaken or considered in similar situation.

Read More “Purge Windows of private data when disk formatting is not an option”

Fresh XAMPP installation — a step-by-step guide

This is more like my private memo, to have a clean check-list of steps I usually undertake, when installing fresh XAMPP for Windows installation. Most steps aren’t unique to my environment, so this article can also help others, that are stuck at some point. Note, that this is purely development environment-oriented installation guide, as XAMPP is not meant to be used as production server.

Read More “Fresh XAMPP installation — a step-by-step guide”

Relative file paths and migrations in Yii1

Watch out for relative file paths. When using them in any action, files lands in a folder (from that relative path) in root directory folder (where they’re is expected, at least according to me). But, when you use the very same path in a migration, then files will land in a folder in protected folder. I have just found this to my surprise.

To “fix” this, you need to add:

[php]dirname(__FILE__).’/../../’.[/php]

in front of your relative path (which makes it no longer relative, though).

Details on Yii forum.

Copy remote files with copy() function

Seven years old comment in PHP manual, which still shines like a real gem! You can use copy() function to easily (one-liner!) copy remote files, without doing messy fopen() stuff:

if(!@copy('http://someserver.com/somefile.zip','./somefile.zip'))
{
    $errors = error_get_last();
    
    echo "COPY ERROR: ".$errors['type'];
    echo "<br />\n".$errors['message'];
}
else echo "File copied from remote!";

steve a h, whoever you’re or were, I salute you!

Private repository with public issues on GitHub

On contrary to BitBucket, GitHub does not allow you to have private repository with public issues. But, you can setup a two different repositories — private for code hosting and public for issues (read more in GitHub Help). And, what is most important and what not everyone knows — GitHub’s commit message’s grammar parsing is powerful enough to handle crossed commits.

Read More “Private repository with public issues on GitHub”

Navigating through selected text instances in Sublime Text 3

Ryan Urie‘s answer on StackOverflow has finally solved my little, but annoying struggle with Sublime Text 3’s key bindings (keyboard shortcuts) for navigating through all instances of currently selected text.

But that wasn’t enough for me! :>

Since ST3 is sometimes used by non-developers then these people my not catch up, how extremely important (to developer) is to be able to select addForeignKey method for example and to navigate through every existing instance of the same method call in entire file with simple keyboard shortcuts. This problem isn’t covered by default setting of Sublime Text 3 keyboard shortcuts and I had to deal with this myself.

Here is the ultimate solution to this problem. Quick and easy, as everything in Sublime Text.

Read More “Navigating through selected text instances in Sublime Text 3”

Multi-column CListView

CListView widget is a great piece of code for quickly rendering lists of items that:

  • are based on your own provided view for each item (and thus let you customize final view in nearly every aspect) and
  • are providing fully functional paginator in the same time.

However, they lack support for rendering items in more than one column. This article shows one of many workarounds to fix this problem.

Read More “Multi-column CListView”

Re-activate previously activated Windows, which suddenly became not activated

If your installed, configured and activated Windows 7 suddenly becomes not activated again, after weeks or months of normal work, first thing you should do, before hanging hours on Microsoft support phone line, is to attempt to activate (re-activate?) it again. This post should help a little bit.

Note that I’m covering only a legal ways here, assuming that you have your valid, legal product key.

Read More “Re-activate previously activated Windows, which suddenly became not activated”

Redirect from post to an external URL

Why would you like to redirect a page’s visitor to an external URL instead of presenting post content?

Well, they may be a dozens of reasons. I found one. I was building a simple product showcase page with cool image scroller based on WordPress and Modest theme from Elegant Themes. Since image scroller contained not only image, but also title and two line entry, it was based on actual posts.

I wanted my users to see these texts, but to not be able to access posts itself. Because there was nothing more than just this image, title and two-line description. That’s why I used URL redirection.

Read More “Redirect from post to an external URL”

Quick mobile UI review

Here is a quick review of some mobile UIs that you can use to develop your mobile application, if you’re developing HTML-like mobile apps.

Note that I don’t like jQuery Mobile for being ugly and slow and I don’t like paid full-featured stuff like Sencha or Kendo. You won’t find them here. I like fast and beauty mobile apps (possibly written in PhoneGap).

So you will find performance-first, beauty-second UI frameworks here. With special emphasis on being PhoneGap-oriented. Only quick review without any unnecessary blah-blah.

Read More “Quick mobile UI review”

Move repository from GitHub to Gogs or any other remote

This is basically a check-list on pushing entire local repository, with all branches, tags and entire history to brand new remote repository and changing default remote setting in local repostiory from one to another. A compilation of this and this answers on Stack Overflow plus some own thoughts. Gogs and GitHub are quite similar to each other and all operations an made on command-line, so you can use this article as an aid in migrating one remote repository to another.

Read More “Move repository from GitHub to Gogs or any other remote”

Installing Gogs on Windows [discontinued]

This article is unfinished and discontinued! It contains a lot of useful information, but will not lead you to the very end. The only reason, for which I wanted to install and use Gogs was the fact, that my programming model (Yii2-based) required me to have a really large number of private repositories (each for every component, that my applications are using). And storing them on GitHub was very expensive.

However, as of May 11, 2016 GitHub has announced an unlimited number of private repositories available for every paid plan. This rendered Gogs completely useless for me. But, in the same time, it was also a very relief for me, because even though a whole long year passed since I started writing this article, I have never actually even touched problem of reconfiguring Composer to use source other than GitHub (Gogs).

Feel free to use this article to learn more about Gogs and its installation on Windows, but keep in mind, that this artice is unfinished and pretty much likely will never be finished.

Read More “Installing Gogs on Windows [discontinued]”

Is PhoneGap’s applications size a big problem to end users?

Since PhoneGap wraps HTML5 and Javascript code (plus all the stuff) into native app wrapper, then we may assume, that in general PhoneGap-based mobile applications will have significantly higher size in compare to native mobile application. This is true in most scenarios and this leads us to a question, if large mobile application size may be a problem to end user?

By an accident, I run into this question from December 2011 asking, if 4 MB of executable size for mobile devices is too much for a simple application. Even though it is over 3,5 years after asking this question, the general rule remains. I found my answer to this question quite interesting and thus I’m sharing it in here.

Read More “Is PhoneGap’s applications size a big problem to end users?”

Fix problems with sudoers or sudoers.so file on QNAP

Root / power-user configuration on QNAP devices is a little bit different (quite weird) than this, what you can find on most Unix/ Linux systems. And sometimes you may be hit with error messages like “admin is not in the sudoers file. This incident will be reported“, “sudoers.so must be owned by uid 0” etc. Here are some tips on what to do in this case.

For second error, claiming that sudoers.so file uid isn’t 0, first go to folder containing this file (/opt/libexec/ on QNAP TS-210) and ls -ls to check, who is current user of it. It should be admin:administ (actually admin:administrators, but ls -ls chops names to 8 characters).

If it isn’t, change ownership of this file and /opt/etc/sudoers folder, by executing:

chown admin:administrators /opt/libexec/sudoers.so
chown admin:administrators /opt/etc/sudoers

As for first error, saying, that admin is not in the sudoers file, you may try to execute sudo usermod -aG sudo,adm admin, but this will most likely fail on QNAP.

If it does, then fix this manually as described in here:

  1. Execute visudo command to edit /opt/etc/sudoers.tmp file.
  2. Scroll down contents of this file, until you reach root ALL=(ALL) ALL.
  3. Hit Enter to add a new line below and write admin ALL=(ALL) ALL.
  4. Hit Esc, enter wq and hit Enter to save file and exit forsakend vi editor.

This is the only solution, that I found working on my QNAP TS-210.

All others, that required using GRUP, were impossible, as you don’t have access to GRUP during QNAP boot.

Bringing Git to QNAP TS-210

There are two (quite obvious) ways, how you can use Git on your QNAP TS-210 (or any other QNAP).

If you only want to be able to update local repositories (i.e. use QNAP as Git client) then this article is for you and all you need to do is to install Git on QNAP and generate proper SSH keys.

If, on the other hand, you would like to store on QNAP repositories, that other uses (i.e. use QNAP as Git server), then you need to search the Internet for some alternative solution, sorry.

Read More “Bringing Git to QNAP TS-210”