Dependency-driven development: forced OSS contributions

It is such a relief when you app just works. Moreover, when it is open. My pet project Xpiks is not only an open-source project itself, but it also uses a lot of the other open-source technologies inside. Qt framework, zlib, hunspell – to name just a few. A big deal is to make them work together. A much bigger deal to make them work together across different platforms (Xpiks is announced as cross-platform for Windows, OS X and Linux). The least problems you can expect – is a tricky build process or somebody’s typo in the Makefile which breaks the-other-system’s build.

More often what you’ll encounter – is people building a huge pile of code working only for their needs. Only for their server. Only for their version if libcurl. Only for x86 operating system. And then they open-source it to GitHub – much like a cemetery for projects with 1 star and 0 forks, decaying there until forgotten forever.

This is how the initial joy of finding an open-source technology you needed is being replaced by a constant frustration of not just a need to slightly tweak some header file or Makefile, but to go the sources, read them, understand everything inside and fix. This is what I have encountered many times and what I did as well.

(more…)

How to keyword and upload photos/illustrations to microstocks

If you’re a photographer new to microstock photography, I highly reccomend you to embark this wonderful way of passive earning using your artworks. But I will suppose that you know what is this about and how basically use it. I would even suppose you’ve passed an exam on some stock agency and uploaded your first artworks. But did you know there’re plenty of stocks? And did you know it’s better to work with all major players of this industry? Shutterstock, iStock, Fotolia, Depositphotos to name just a few. And there is a lot more.

Keywording and uploading your photos to stocks can be fairly considered as the most boring part of this business. It’s quite a long way to upload your files to 10 different websites, keyword them and submit. For such a purpose I’m working on a keywording and uploading tool, called Xpiks. It’s main objective is to help you to dramatically reduce time you spend on keywording and uploading and enable you to upload to more stocks simultaneously. For that reason I added features like parallel editing of several files, keywords suggestion, spell checking, automatic FTP uploading, stock requirements checking and others.

You can see screenshots or read more on how to use it on the official website.

This program is open source and free and available through all major platforms: OS X, Windows and Linux. There’s a support section and you’re welcome to file your bug or post a question there.

Don’t waste more time than needed, download Xpiks and enjoy!

Building Hedgewars under OS X Yosemite

Ok, you considered to build Hedgewars by yourself. To be clear, I’m going to build 0.9.21 on 10.10 Yosemite on MacBook Pro with Retina. First of all, read official manual. After source code pull from Mercurial failed via hg command I considered downloading source on the Downloads page.

As original HowTo says, you should build Ogg and Vorbis, but while Ogg build succeeded, Vorbis said it can’t resolve u_int16_t type and after some googling I’ve found it was a known issue and you should replace #include <inttypes.h> with #include <sys/types.h> under #elfif (defined(__APPLE__) && defined(__MACH__)) in file ogg/os_types.h. Then everything goes more or less ok until you’re trying to generate makefile with Cmake. I had to turn off video recording feature, screenshots in PNG (BMPs instead) and no local server. Finally, I came up with

cmake . -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake -DNOPNG=1 -DNOVIDEOREC=1 -DNOSERVER=1 -DCMAKE_BUILD_TYPE=Release

After successful build you still can’t play, because hwengine fails to launch. It looks for libfreetype.6.dylib in /usr/X11, but you might even don’t have X11 installed. If yes, proceed to Quartz/X11, download and install it. Don’t forget after all make symlink to original X11 directory using sudo ln -s /opt/X11 /usr/X11.

And still, after everything is done, Hedgewars fail to run in fullscreen mode so you might consider running it via VirtualBox and some Linux distro instead.

By the way, you can download my build of Hedgewars 0.9.21 for OS X Yosemite 10.10 here.

Simple Gimp plugin for batch processing in Python

Not so far ago I needed to batch-process some images. The task was to resize them so they fit to given smallest resolution. Although Gimp has some batch-processing plugins, I wasn’t able to solve my problem with them. That’s why I’ve invented small little bike and I’d like to share with you workarounds and explanations of some Gimp plug-in development issues.

Your plugin can take as little as just one python file with call to function register (from gimpfu) and passing to it some metadata and actual method of plugin. You can read more about parameters to register on official docs website. But a few moments still need clarifications.

(more…)

How to process Nikon D5300 NEF and other unsupported RAW formats in Darktable

My favorite tool, Darktable, does not support new Nikon D5300 NEF format and, obviously, a lot of other RAW formats due to proprietary software for them. But there is a solution. There is a free tool from Adobe for Windows and Mac: DNG converter, which is free and converts a lot (almost all, I guess) of proprietary RAW formats to DNG (Digital NeGative – open lossless raw format. Complete list of supported RAW formats for DNG Converter.

snapshot2

For now DNG Converter is fairly simple so it runs flawlessly under Wine and you’re able to export all your NEF (or other) photos first to DNG and then to process them in your favorite RAW editor. That’s it!

(in my case then I switched Alt-Tab from working DNG converter, it crashed under Wine, but when window is active all the time, it works ok)

Also, if you set file format to 12-bit NEF in your camera, it would have green colors if you open them in any RAW editor (Darktable, RAWTherapee, Lighthouse, etc). But if you chose 14-bit RAW, it looks ok despite the fact it would be more sharp in native Nikon Windows- and Mac-only software.

If you have any questions, feel free to ask them in commets!

UPD: Darktable 1.6 supports D5300 NEF files if processed without OpenCL

TeamCity 8 on CentOS 6.4 from scratch

In this post I’ll describe whole TeamCity installation process on a fresh CentOS (on the moment I’m writing it’s 6.4) for your private project or startup.
First, proceed to the CentOS downloads page and download CentOS distro through .iso, .torrent or whatever-you-like and start the installation process. If you’re familiar with any  linux distro installation, it won’t take you much time to complete the installation. I’m using the minimal configuration without any Desktop Environment and with minimum core- and other system utils. Nonetheless, consider installing iptables, elinks and java (openjdk).
After the installation is over, login, add a user for yourself with adduser and let’s start with TeamCity (maybe you’ll also consider adding yourself to the sudoers file).
First, create /opt/jetbrains/ directory and download latest TeamCity using wget.
# mkdir /opt/jetbrains
# cd /opt/jetbrains
# wget http://download.jetbrains.com/teamcity/TeamCity-8.0.5.tar.gz
# tar -xpzf TeamCity-8.0.5.tar.gz

Now lets create a system user (e.g. no home directory) for TeamCity to resolve security issues correctly:

# adduser -r teamcity
# passwd teamcity
# chown -R teamcity:teamcity TeamCity
We’ll use PostgreSQL for the internal database for TeamCity. So let’s install postgresql packages (8.4 for CentOS 6.4). For details of the PostgreSQL installation please refer to official webpage.
# yum install postgresql
# service postgresql initdb
# chkconfig postgresql on
Also edit the /var/lib/pgsql/data/pg_hba.conf file to allow authorization from localhost. Go to the end and replace ident to trust for localhost in the configuration for hosts. Now lets create another user for the future TeamCity database and create a database for that user.
# sudo -u postgres psql postgres
password postgres
# sudo -u postgres createuser -D -A -P teamcity_user
# sudo -u postgres createdb -O teamcity_user teamcity_db
(D = Cannot create databases, A = Cannot add users, P = Force password prompt)

MediaWiki installation on a linux guest in the VirtualBox: how-to, tips & tricks

I’ve spend half of a day trying to get MediaWiki working on a VirtualBox for the internal project in the internal network. Looks like it’s done now and I want to share tips to help someone to spend less time in the future.

I’ve been installing and configuring MediaWiki 1.21 on the OpenSUSE 12.3, but all tips are valuable for any linux distro.

(more…)

Solving mouse delays and lags in linux

I’ve been experiencing strange mouse delays and lags some time ago and now I’ve become tired of it. I’m using OpenSUSE with 3.7.10 kernel and first thing I tried was upgrading the kernel (to 3.12) which was quite useless. Googling related to my distro also wasn’t helpful.

The trick was in laptop-mode-tools which I’ve installed earlier to make my laptop battery life longer. There is an usb autosuspend options which just suspended my usb wireless mouse. So setting

AUTOSUSPEND_USBTYPE_BLACKLIST="usbhid"

in the

/etc/laptop-mode/conf.d/usb-autosuspend.conf

and running

/etc/init.d/laptop-mode restart

was enough.

Rails development environment in Emacs on OpenSuSE Linux

Today we’ll set up a complete Ruby On Rails development environment on Linux. For an IDE we’ll use Emacs and for host system – OpenSUSE.

Let’s install latest Ruby+Rails bundle before configuring Emacs. You can refer to nice article on that. In short, you need get RVM and follow through script steps in terminal:

> bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Then load path to installed RVM in current bash session:

> . ~/.bash_profile

It’s a bit frustrating that if bash finds a .bash_profile file, it ignores .bashrc, so be careful. Usually, I just move this one line from .bash_profile to .profile or .bashrc.

Then check requirements and install everything what is needed

> rvm requirements

Now let’s set ruby version to 2.0 and install rails (4):

> rvm install 2.0
> rvm use 2.0
> gem install rails
> gem install sqlite3

Now, when everything is ready, we can configure Emacs installation. I assume you’ve already installed emacs package via your favorite package manager.
Then lets add some custom configuration file for ruby configs in the .emacs.d directory, say ruby-configuration.el and add it to your .emacs file using

(load "~/.emacs.d/ruby-configuration.el")

(more…)

Problems when ejecting WD My Passport in Linux (OpenSUSE)

Struggled to safely eject my 1TB  Western Digital My Passport external hard drive in OpenSUSE. Googling regarding Western Digital was inefficient, because lots of people have been just saying not-such-a-good-things about WD products and nothing valuable regarding ejecting it.

Usual eject command had no success: hard drive continued to spin. I’ve even upgraded firmware to 1.49 on my Windows 7 machine at work. No succcess.

After some time googling I’ve found next working solution:

  • install udisks utility
  • run sudo udisks --unmount /mount/point from terminal
  • run sudo udisks --detach /your/device from terminal
  • profit

So, enjoy!