Search

Resume and bio of the author Couple of articles related to my hobby - robotics
My impressions about immigration to Australia. In Russian only. Recipes for everyday problems solving
Linux-related posts Windows-related posts
Software-related posts A lot of info about hardware
Different tools you might find useful Posts about various web technologies
Everything that doesn't fit the rest of the menu RSS feed for this blog

Tag Cloud

Archives

Links

Andrey Mikhalchuk’s Blog

Technoblog about life

Jul 18, 2014 How to migrate ownCloud 6 from sqlite to MySQL

Those who do not know what ownCloud is probably should read about it here: http://owncloud.com. This is an awesome tool that provides functionality similar to dropbox, but uses your own server to host the files. We all know about dropbox’s bad behavior like storing passwords on the server side, accessing your content when you don’t want it. Actually recently I was monitoring disk activity on a computer with dropbox installed on it and found that for some reason dropbox keeps reading files where it has not business to do. It was clearly configured to replicate files in its own folder, yet was reading all files on the disk. One way or another there are a lot of reasons to get rid of dropbox and switch to ownCloud. It’s cheaper, secure and can be used to store business or confidential information where dropbox fails to provide both security and confidentiality.

By default ownCloud uses sqlite3 to keep records of the files it stores and people like myself that decided to go forth with the default configuration get trapped with this configuration. Once you load more than couple gigs of data you will notice that it gets slower and sloooower and slo… Sometimes you might even experience complete freeze on the client side.

The solution to the problem is moving the data from sqlite to something mroe serious like MySQL. Both databases have SQL in their name so the migration should be easy. Unfortunately ownCloud doesn’t provide any means to automate this migrate. To make matters worse the dialects sqlite3 and MySQL use are a little bit different so you can’t feed sqlite3 database dump directly into MySQL. I saw multiple solutions to the problem migrating ownCloud 5, but nothing for OC6 so far. Here is how I migrated it in just a few simple commands:

Apr 11, 2014 Attaching >2Tb disks to Linux

Here is the sequence of commands to make disk space usable in Linux for disks >2Tb (so your regular fdisk won’t help you here).

Nov 12, 2013 AWS EC2 ssh not responding in RHEL 6.4 AMI

I was fighting with an AWS bug today seeming just ridiculous for a system that makes ssh the only way to access the server. With no console login EC2 users are completely dependent on flawless sshd operation and Amazon team just did a really bad job preparing the RHEL 6.4 image.
So here are the symptoms: you create an image from a perfectly working system with the purpose to clone it. Then you create new instance from the AMI and it seems working fine too, you can ssh to it no problem. After a reboot or too it suddenly stops responding to ssh thought the rest of the system seems working fine (HTTP server for instance). Server logs do not show any errors. Reboots do not help and EC2 doesn’t provide console access to the server.
Here is the solution:

Sep 27, 2013 rPlay rocks!

I’m currently beta-testing rPlay and this software totally rocks! What’s rPlay? Well, imagine yourself willing to share content of your iPhone or iPad screen with you family. There are couple ways to do this: you can get an Apple TV ($99) or … well, that’s actually it. AirPlay is a proprietary protocol so the number of options is actually extremely limited.

Last year a small revolution happened: Raspberry Pi got released to the markets. Raspi (short for Raspberry Pi) is awesome. For just $35 you can get a computer powerful enough to output 1080p video to your TV yet small enough to fit your pocket. There are currently dozen mostly Linux-based operating systems running on this computer and the platform is totally open (unlike Apple). Obviously it didn’t take long for hackers to implement AirPlay on Raspi so now for just $35 (well, plus SD card, cables, power supply, case, shipping = about $70) you can play music from any i-device to speakers attached to Raspi. Effectively you can turn Raspi into an Apple equivalent of AirPort Express, but not Apple TV.

For streaming video Apple uses slightly different functionality called AirPlay Mirroring and this protocol was not implemented on Raspi yet. Until now. Smart guys from VMLite finally figured out a way to mirror video from iPhone/iPad via Raspi to the TV. Not sure how long it took them to do this incredible work, but it actually works. Well, it is still in beta, but totally usable and shows great performance.

rPlay is a great tool for presentations, sharing Youtube videos with your friends and family or playing iPhone games on a large screen. Here are a few great features of this software:
- It supports both landscape and portrait mode (rotate your iPhone and the image on the TV will rotate as well)
- Has great video and sound synchronization – something a lot of streaming software lacks. Well, there is a half-second delay when you output sound via HDMI, but if you plug speakers via USB port all is in sync. I guess that’s why they call it beta.
- It is quite stable. I kept switching streaming from one iDevice to another and once it froze. But, again, this is beta and I kept beating it hard, so given the circumstances it is very solid even in beta-version
- One extra cool feature is a limited support for Google Chromecast. Personally I do not use it much as AirPlay covers it all but for Android users that’s some great news.

I already mentioned multiple times that the current version is in beta stage, so there are a fe quirks which hopefully will get resolved in the final version:
- the video and sound being not in sync when sound is played over HDMI (use USB sound output to fix this problem)
- Netflix 1080p streaming is not smooth enough. If you overclock Raspi it gets better, yet still not as smooth as being played without mirroring
And that’s basically it. I saw a lot of “final versions” being released with such minor defects. Microsoft would totally release it :) Still I’m really glad VMLite decided to keep polishing the software until perfect and can’t wait for the final product.

May 10, 2013 Default login and password for JBoss EAP 5.1.2

The default login for the admin user for the JBoss Enterprise Application Platform (EAP) 5.2.1 and other v5 versions is “admin”. The passwords is obviously also “admin”. However if you try those right after the installation they won’t work, because you need to patch two files:

May 8, 2013 make: /opt/local/bin/ginstall: No such file or directory


make: /opt/local/bin/ginstall: No such file or directory

This happened to me while running bundle install on json v1.7.7.
The fix is

# sudo if necessary
ln -s /usr/bin/install /opt/local/bin/ginstall

May 8, 2013 Installing Oracle XE 11g on OpenSuSE 12.2 and similar

Overall the installation is pretty smooth, just follow the instructions on Oracle website.

There are two minor hiccups though:
1. cannot touch `/var/lock/subsys/listener’: No such file or directory

This error is cause by the fact there is no /var/lock/subsys directory in some Linux distros, so you need to create one. Before you run “/etc/init.d/oracle-xe configure” run

mkdir /var/lock/subsys

2. The second one is trickier. When you run the configuration wizard it fails while configuring the database and the log files contain something like

==> cloneDBCreation.log < ==
alter system disable restricted session
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

Mar 2, 2013 Don’t use valgrind on MacOS!

Subj,
It’s buggy and misleading. You will do better by installing Oracle Virtualbox (free) with Linux (free) and running valgrind (free) in the virtual machine.

Mar 2, 2013 GIT: ! [remote rejected] master -> master (n/a (unpacker error))

I’m working on multiple machines under multiple accounts on the same project and using git to sync between the codebases. The program by its nature has to run under root account, so no wonder at some point permissions got screwed up and I’ve got stuck with this error:

! [remote rejected] master -> master (n/a (unpacker error))

The solution is quite simple though requires access to the master repo:

Feb 26, 2013 Why on earth make invokes cc instead of gcc!?!

I’m working on my next cool project (subscribe to RTFMS.com to find out details) and got stuck with an interesting problem. Here is a fragment of my Makefile:

...
SOURCES := $(wildcard *.c)
...
%.o: %.c %.h
$(I_CC) $(I_CCFLAGS) -c $< ...

When I run make clean;make the output is following:

gcc -g -I. -I/usr/include -c 1.c
gcc -g -I. -I/usr/include -c 2.c
cc -c -o main.o main.c
gcc -g -I. -I/usr/include -c 3.c
gcc -g -I. -I/usr/include -c 4.c
gcc -g -I. -I/usr/include -c 5.c
gcc -g -I. -I/usr/include -o gr 1.o 2.o 3.o 4.o 5.o main.o -llib1 -llib2

See how for all the files this invokes compiler with correct flags except for main.c? Not a big deal on most linux systems, but I’m compiling on mac and what’s worst I’m actually crosscompiling. This ugly feature ruins the entire compilation process, so I have to run

gcc -g -I. -I/usr/include -c main.c

before running make so everything gets compiled the same way.

This kept me puzzled for an hour or so until I got annoyed by this manual compilation step and found what’s going on …

Site Map (c) Andrey Mikhalchuk, 2005-2008