Archive for the 'English' Category

Building Chromium Embedded Framework (CEF) on Linux

Prerequisites: What I had?

  • Ubuntu 11.10 x86
  • 2770 Mb of DDR2
  • ~17Gb of free space on NTFS partition
  • I wanted to compile CEF1 1271 branch on Linux

Results & Downloads: What I got?
Here you can download CEF1 1271 binary linux distribution (ATTENTION: ~365MB): http://bit.ly/cef1linux1271x86

CEFclient application

CEF client application

Process: How to build Chromium Embedded Framework (aka CEF) on Linux?

Note to those, who’ll try to compile that on Linux, but on NTFS partitions:
Mount your NTFS partition using
sudo mount -t ntfs -o rw,auto,fmask=0022,dmask=0000,uid=1000,uid=1000 /dev/sdaX /your/mounted/ntfs/folder
Then all your files will be mount, as if they belong to the user with id 1000 (usually default user in linux, root is 0) and all the files could be executable.

  1. Read BranchesAndBuilding from CEF wiki.
  2. Select release branch you need. I used 1271 CEF1: http://chromiumembedded.googlecode.com/svn/branches/1271/cef1
  3. Use automated method: http://code.google.com/p/chromiumembedded/wiki/BranchesAndBuilding#Automated_Method
  4. Double-check, that you have read/write permissions on files and can execute scripts in your development environment.
  5. Checkout automate tools from svn:
    svn checkout http://chromiumembedded.googlecode.com/svn/trunk/cef1/tools/automate /path/to/automate
  6. Read http://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/tools/automate/automate.README.txt
  7. Execute:
    python /path/to/automate/automate.py --download-dir=/FULL/PATH/TO/DOWNLOAD/FOLDER --url=http://chromiumembedded.googlecode.com/svn/branches/YOUR_BRANCH_NUMBER/cef1
  8. Generally, it will fail after the source checkout. Execute:
    ...download/chromium/src/build/install-build-deps.sh
    It will install build dependencies for chromium.
  9. Execute:
    python /path/to/automate/automate.py --download-dir=/FULL/PATH/TO/DOWNLOAD/FOLDER --url=http://chromiumembedded.googlecode.com/svn/branches/YOUR_BRANCH_NUMBER/cef1 --force-update --force-build --force-distrib
  10. If you are lucky enough, build won’t fail and you’ll enjoy generated cef_binary_1.XXX.YYY_linux.zip in the ...download/chromium/src/cef/binary_distrib folder!
  11. In order to check this, cd into ...download/chromium/src/cef/binary_distrib/cef_binary_1.XXX.YYY_linux/Release folder and run: ./cefclient
    I hopy, you’ll enjoy that simple cefclient app, built from source!

Here’s the screenshot of the cefclient :)

That’s it! As the wiki states, you can even set up CI job for that, using your favourite CI tool!

Shutdown, Reboot, Suspend or Hibernate with user priviliges via D-Bus

Some distros don’t allow you to
shutdown -r now
from terminal without superuser password.
Shutdown/Reboot/Suspend/Hibernate with user priviliges in Linux is possible via D-Bus. You just need consolekit and upower packages installed.

Here are the commands:

Operation D-Bus command
Suspend dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend
Hibernate dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
Reboot dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
Shutdown dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

Just paste them in your beloved terminal emulator and press enter :)

Handball

People would take the Olympics a lot more seriously if they didn’t include handball. They’re just throwing a ball to each other like a bunch of kids. It’s just stupid.

And if you win, how do you look, say, the marathon gold medalist in the eye?…

Handball Gold Medalist: What did you get your gold for?
Marathon Gold Medalist: I ran 42 kilometers in extreme heat.
Handball Gold Medalist: Great. I threw a ball back and forth for a bit with someone about two feet away from me. Then I had a bath.
Marathon Gold Medalist: Big twat.

 

(c) Is It Just Me Or Is Everything Shit? (Steve Lowe & Alan McArthur)

Same shit would be with frisbee, if it gets included into Olympics :)

BlackBerry hidden key combinations

I’ll collect all the hidden key combinations in BlackBerry in this post.
Sort of wiki-page.

Combination Where Purpose
ALT+LGLG Ribbon (screen with apps) Open BlackBerry Event Log
SHIFT+BUYR Options>Status Show data/voice usage
?123+M,M, Ribbon (screen with apps) Open BlackBerry Event Log on touchscreen devices

I received my OCPJP certificate

Oracle Certified Professional, JAVA SE 6 Programmer

OCJP Certificate

I successfully passed Oracle Certified Professional Java Programmer Exam (formerly SCJP) a month ago. That was my birthday present. I passed right one day before my 20-th BD.

For everyone, who is willing to pass it I’d recommend just 2 things:

  1. ExamLab for SCJP 6.0 – the best mockup tests for this exam! Free, cool and deep explanations, lot’s of tests. If you can score ~60-70% in this app, you would possibly pass OCJP with a high score (~80-90%).
  2. SCJP Sun Certified Programmer for Java 6 – the so-called K&S book (Katherine Sierra and Bert Bates). If you read all the book, you’ll definitely increse your java knowledge. The best book. 100% coverage.

Have fun!

Mainz trip [part 1]: start

Boeing-737

Boeing-737

Finally, I can read in a bus again. For the last several months I could do almost nothing in a bus, except listening to music. This syndrome was caused by an international summer workcamp in Mainz, Germany. It was an outstanding experience.

I always liked volunteering. The main reasons for me were the ability to meet tons of new people and do something good and useful for them. That’s why I  volunteered at Nash Fest, Zahid and twice at Up Fest. At that music festivals I  usually helped people with registration and navigating through the festival territory, acted as a live informational box. At some point, I’ve heard about international summer workcamps. That sounded promising, ‘cos I pretended volunteering in foreign country is more fun.

My friend Taras and I were carefully choosing the camp to go to. List if the camps was kindly provided by our sending organisation, Union-forum. Eventually, we’ve chosen one in Mainz, 300k+ city near Frankfurt. After all the negotiations and preparations we had all the documents and were ready to go.

The cheapest and the quickest way, to get there, is from Rzeszów to Frankfurt-Hahn using Ryanair airlines. That was my first airplane flight, so for me that was the most exciting path too.

We stepped on board. The trip began…

To be continued:
1. Volunteering
2. Choosing the camp.
3. Preparations/road to camp/Luxembourg.
5. Camping: people, food, work, free time etc.

Crappy legal java code

JavaThat was hard evening.

After reading some java books, right before I went to sleep, some java code came to my mind…


class ${public void _($ $4){}}
class $<_, $, $_> {$ _;<_> $($ _){}<$> $($ _,$ $_){_=$_;}}

And that’s not the upper bound. You can enchant it the way you want, creating crazy valid useless (or even useful?) POJOs 😀

wait() and notify()

Thread Synchronization

Excerpt from old “Exploring Java” book.
It clearly states, what wait(), notify(), notifyAll() are used for and what they do.

With the synchronized keyword, we can serialize the execution of complete methods and blocks of code. The wait() and notify() methods of the Object class extend this capability. Every object in Java is a subclass of Object, so every object inherits these methods. By using wait() and notify(), a thread can give up its hold on a lock at an arbitrary point, and then wait for another thread to give it back before continuing. All of the coordinated activity still happens inside of synchronized blocks, and still only one thread is executing at a given time.
Continue reading ‘wait() and notify()’

Rutorrent + rTorrent on Debian Server

ruTorrent logoOnce, I’ve installed it myself.
Yes, in the way, everyone did this: checkout, compile with xml-rpc support, install web-server, bind everything together and enable some security.
It worked great, but after some updates, it broke up. Don’t know what happened exactly, I was a bit busy at that time.

Several weeks ago, I desperately needed torrent client, but in that environment, no applications could be installed. It was a great disappointment to find out, that me own rTorrent is down on the server. So I tried to perform mentioned actions again, but with no luck.

Right at that moment, I found out about an AWESOME!!! script, which does everything you need! It just installs

  • rTorrent
  • ruTorrent
  • your favourite web-server
  • FTP
  • Webmin

It binds everything together, and it just works!

Here’s the MAGIC link to the documentation:
http://forums.rutorrent.org/index.php?topic=608.msg4427
Everything is pretty strait-forward and troubleless.

Hint: run the downloaded script inside screen session. Script, itself, runs several minutes. It configures and compiles everything. So, please, be patient. If you have poor ssh access, it would be much better to reattach to the running screen process, after connection failure or something.

The only thing, I had to modify afterwards, was a web-server’s port, ’cause my ISP blocks port #80.
As I’ve chosen lighttpd, as my webser, I had to modify lighttpd config file
nano /usr/share/lighttpd/lighttpd.conf
and set
server.port = 1234

Apocalipse v0.1-prealpha. changelog

As you know, today is the first apocalypse.
I hope, it’s not the last one :)
Generally, all the info’s got from twitter, as a great news tool, & real life.
I’ll try to keep this list updated with the latest facts :)

  1. My electrical socket burst with flare in the morning. Probably caused by an electrical overload. That looked pretty osum for the first 0.2 sec. Hostel is old, and it’s electrical wires can’t handle current student’s neds.
  2. Moscow people vandalized flower bed in 5 minus
  3. Belorussian dollar situation caused one manager to hang himself in the office.
  4. My ISP, UarNet, suffered some cable problems. So for about an hour everyone was faced with “Warning! Emergency recovery measures are kept! Internet will be back soon!

…updates in progress :)




Hosted by EOMY.NET