Change allocated memory in Glassifish using asadmin tool

Hi there,

I want to share my experience in changing the settings for the allocated memory in Glassifish. In particular, changing the amount of initial memory (-Xms) and changing the maximum memory (-Xmx) allocated to Glassfish.
Continue reading

Posted in hacking, programming | Leave a comment

Registered voters in the Diaspora for the 2014 presidental elections in Macedonia

Continue reading

Posted in Personal, programming | Leave a comment

Holidays in High Tatras

This year we decided to go on holidays in High Tatras (Slovakia), mountain range located on the border between Slovakia and Poland. Nice weather, tasty food, and of course, very nice mountains with plenty of mountain lakes and 17 peaks exceeding 2,500 m above sea level! What more could you wish for?

IMG_1629.jpg
Continue reading

Posted in Personal | Leave a comment

Permanently change User Agent string in Safari and Chrome

In Safari you can change the User Agent string by using the developers option “Develop -> User Agent -> Other”. However, this will change the user agent just temporally. After you restart Safari, the old User Agent string will be used. If you want to permanently change the User Agent string you need to run the following command:
defaults write com.apple.Safari CustomUserAgent "\" your new user agent string \""

To change the default User Agent in Chrome you should create an application with the Automator. Run Automator, select Application as type of document, in the Library search for “Run Shell Script” -> double click, change the cat command with the following command
open -a "Google Chrome" --args --user-agent="your new user agent string"
save it in your Applications folder. Thats it!
If you have a shortcut to your old Google Chrome in the Dock, remove it. Then, start your newly created Chrome application and pin it to the Dock (right click -> Options -> Keep in Dock).
To change the icon of the newly created application you can do the following: right click on the old Google Chrome application -> Get Info -> click on the Chrome icon in the top left corner -> Cmd-C. Then, Get Info on your new application -> click on the icon in the top left corner -> Cmd-V.
Now the user agent string will be the one you wanted!

Posted in hacking, mac os | 5 Comments

Get Rid of ‘Microsoft User Data’ folder in Documents Folder

After installing Office 2011 for Mac OS, a folder called ‘Microsoft User Data’ will be created in your favourite ‘Documents’ folder.
I have no idea why Microsoft is creating such application related files in my Documents folder. There are other places where they can keep such configuration files.

However, if you want to get rid of this folder, you should move it in the ‘Preferences’ folder located in ‘/Users/<username>/Library/Preferences‘. Not that there exists also another folder with the same name found in ‘/Library/Preferences‘, but this is not the right location you need.
To move the folder you can run following command in terminal:

mv /Users/<username>/Documents/Microsoft\ User\ Data/ /Users//Library/Preferences/

Posted in hacking, mac os | Leave a comment

Streaming video using Node.js

In this post I am going to show you how you can set-up Node.js to stream video files to an HTML5 video tag.

First, lets create simple HTML client.

The client offers the same video in 3 formats: video/mp4, video/ogg and video/webm. Formatted video in mp4 should work fine in Safari and Chrome, ogg in Chrome and Firefox, while webm in Chrome and Firefox. For these reasons, it is recommended that you offer the same video in ogg, mp4 and webm formats.

The server should stream the video according the “partial content” requests sent by the client (browser).
An example of a HTTP request provided by Chrome and a response is presented in the
following code snippet.
Continue reading

Posted in html5, Node.js, programming | 6 Comments

Free online courses

Recently I completed great course for MongoDB and it was a grateful experience. At the moment there are 3 courses available: MongoDB for DBAs, MongoDB for Java Developers and MongoDB for Python developers.

More great Computer Science -oriented courses (also in other fields) are offered by Coursera and edX. Note, the some of the courses are provided by highly nominated universities such as MIT, Stanford University, Princeton University, etc.

Advance your knowledge and career! ;-)

Posted in education, free | Leave a comment

Splash screen (login) not showing in Ubuntu 12.10

Recently I installed the latest version of Ubuntu 12.10. The installation went ok however, every second time I tried to log-in I couldn’t. The log-in screen wasn’t showing.

The solution was to edit the grub and add the following line:
GRUB_GFXPAYLOAD_LINUX="1680x1050"

To edit grub run following command and add the line above:
gksudo gedit /etc/default/grub

Finally, update grub:
sudo update-grub

FYI, I run a GeForce 210 graphic card with a DELL 24″ monitor connected on DVI. The problem was only when I had the monitor connected on DVI, on VGA was ok.

Hope you find it helpful!

Posted in hacking, linux | Leave a comment