tag:blogger.com,1999:blog-19825798582453261312024-03-14T03:00:18.430-07:00GAP's BlogAnonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-1982579858245326131.post-35037158458926487792016-10-02T08:00:00.000-07:002016-10-02T08:00:17.628-07:00Getting Angular-CLI on Fedora 24Well we all love Angular :). But for a developer who is stepping from Java Maven world into Javascript client side development with Angular2, nodejs, webpack etc is some what alien. Well the thing is there are so many built tools, packging tools out there for javascript which is hard to grasp the standard to start with.<div>
<br /></div>
<div>
But like the prayers been answered we have <b>Angular-CLI</b>. But it was bit of a bumpy ride for me to get it started on Fedora24 box. So here are the steps to get you going</div>
<div>
<br /></div>
<div>
1. You need to install g++ if you don't have it yet, run the following command to install it.</div>
<blockquote class="tr_bq">
$ sudo dnf install gcc-c++</blockquote>
2. Then update the npm to latest, i mean the very latest or next version by running the following command<br />
<blockquote class="tr_bq">
$ npm -g install npm@next</blockquote>
3. Clean the npm module cache by running the following command<br />
<blockquote class="tr_bq">
$ npm clean cache</blockquote>
4. Now you can install angular-cli by running<br />
<blockquote class="tr_bq">
$ npm install -g angular-cli</blockquote>
Thats it, Now you can follow documentation on https://cli.angular.io/ and start developing your first angular2 application.<br />
<blockquote class="tr_bq">
</blockquote>
<blockquote class="tr_bq">
</blockquote>
Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com1tag:blogger.com,1999:blog-1982579858245326131.post-67945299078570787822016-04-16T22:58:00.000-07:002016-04-16T22:58:31.221-07:00Perfect GTK styles for Eclipse<div class="tr_bq">
Recently i switch to KDE and i had to work on the eclipse gtk settings again to get rid of huge toolbars. But lucky ubuntu forums had lot of help and the following particular forum post helped to solve it.</div>
<a href="http://ubuntuforums.org/showthread.php?t=1465712" target="_blank">http://ubuntuforums.org/showthread.php?t=1465712</a><br />
<br />
Now before you start you need to make sure the eclipse is running in gtk2 mode. Basically you can do it with a small shell script as below.<br />
<br />
<blockquote class="tr_bq">
#!/bin/bash<br />export SWT_GTK3=0<br />./eclipse</blockquote>
Now you need to create a gtkrc file which you can select any name you like, But i choose it to name as <i style="font-weight: bold;">.eclipse-gtkrc-2.0</i>. Now copy the following content into this file and save it.<br />
<i style="font-weight: bold;"><br /></i>
<blockquote>
include "/home/<b>{user.home}</b>/.gtkrc-2.0-kde4"<br />style "gtkcompact" {<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButton::default_border={0,0,0,0}<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButton::default_outside_border={0,0,0,0}<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButtonBox::child_min_width=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButtonBox::child_min_heigth=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButtonBox::child_internal_pad_x=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkButtonBox::child_internal_pad_y=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkMenu::vertical-padding=1<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkMenuBar::internal_padding=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkMenuItem::horizontal_padding=4<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkToolbar::internal-padding=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkToolbar::space-size=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkOptionMenu::indicator_size=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkOptionMenu::indicator_spacing=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkPaned::handle_size=4<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkRange::trough_border=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkRange::stepper_spacing=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkScale::value_spacing=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkScrolledWindow::scrollbar_spacing=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkTreeView::vertical-separator=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkTreeView::horizontal-separator=0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkTreeView::fixed-height-mode=TRUE<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkWidget::focus_padding=0<br />}<br />style "compact-toolbar"<br />{<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>GtkToolbar::internal-padding = 0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>xthickness = 1<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>ythickness = 1<br />}<br />style "compact-button"<br />{<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>xthickness = 0<br /><span class="Apple-tab-span" style="white-space: pre;"> </span>ythickness = 0<br />}<br />class "GtkToolbar" style "compact-toolbar"<br />widget_class "*<gtktoolbar>*<gtkbutton>"<span class="Apple-tab-span" style="white-space: pre;"> </span>style "compact-button"<br />class "GtkWidget" style "gtkcompact"</gtkbutton></gtktoolbar></blockquote>
<b>{user.home} </b>must be replaced with the user home folder name of yours.<br />
<br />
Now update the shell script that you have made to run eclipse in gtk2 mode as follows.<br />
<br />
<blockquote class="tr_bq">
#!/bin/bash<br />export SWT_GTK3=0<br />ECLIPSE_HOME=/opt/eclipse/neon/eclipse<br />GTK2_RC_FILES=~/.eclipse-gtkrc-2.0 $ECLIPSE_HOME/eclipse</blockquote>
Update the paths to suite you and that's it. Your eclipse will look as follows<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhb25H5pfmUnMKMt5vGGvTeRVWJtIapchJiRZkMtyA25z8vm9zu5fpMeOlhhzzSBAVhNvg06XPiTchODcFRvQ1Dk8q5Hp9oOPSZ9BAKTs7ZyCrL8EOeJbOy3xo1GBzjSaF4WwoXkgvRb4/s1600/eclipse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="56" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhb25H5pfmUnMKMt5vGGvTeRVWJtIapchJiRZkMtyA25z8vm9zu5fpMeOlhhzzSBAVhNvg06XPiTchODcFRvQ1Dk8q5Hp9oOPSZ9BAKTs7ZyCrL8EOeJbOy3xo1GBzjSaF4WwoXkgvRb4/s320/eclipse.png" width="320" /></a></div>
<div>
<br /></div>
<div>
Enjoy :)</div>
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-64574340375963485372016-04-10T19:58:00.000-07:002016-04-16T07:46:53.626-07:00Huawei E3131 on Ubuntu 15.10This post is about getting the Huawei E3131 usb modem to work smoothly on Ubuntu 15.10. If you are a user who is using this modem you must have experienced that the modem fails to connect on a cold start. You need to unplug it and plug it again after you logged in to get the modem working. Well while doing some digging in the internet i came across the following bug report which helped me to fix the problem.<br />
<br />
<a href="https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch-data/+bug/1192297" rel="nofollow" style="-webkit-user-drag: none; background-color: #fafafa; color: #6611cc; cursor: text; font-family: 'Roboto Slab', 'Times New Roman', serif; font-size: 14px; line-height: 19px; pointer-events: none; white-space: pre-wrap;" target="_blank">https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch-data/+bug/1192297</a><br />
<br />
What i did was the following<br />
<br />
<ul>
<li>Copy /lib/udev/rules.d/40-usb_modeswitch.rules to /etc/udev/rules.d/40-usb_modeswitch.rules </li>
<li>Edit /etc/udev/rules.d/40-usb_modeswitch.rules and add the following rule at the end of the rule list. Make sure its above the LABEL</li>
</ul>
<blockquote class="tr_bq">
# Huawei E3131H<br />
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14fe", RUN+="/usr/sbin/usb_modeswitch -v12d1 -p14fe -J"</blockquote>
<ul>
<li>Comment the following rule as below</li>
</ul>
<blockquote class="tr_bq">
# Generic entry for all Huawei devices, excluding Android phones<br />
# ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"</blockquote>
<div>
Thais it with the configuration. Now shutdown the pc and start it to see if it is working :)<br />
<br />
<b>Update:</b><br />
<b><br /></b>
The configuration file is no longer needed since the rule uses the huawei mode switch.</div>
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-90220139508136520132015-03-15T07:05:00.000-07:002015-03-15T07:05:30.729-07:00The first release of eclipse-themesThe first release is out for <a href="http://gayanper.github.io/eclipse-themes/" target="_blank">Eclipse-Themes</a> plugin which contains some themes which are inspired by Google Materiel Design Colors. More information at <a href="https://github.com/gayanper/eclipse-themes/releases/tag/1.0.0" target="_blank">Release 1.0.0</a><br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-26803069331927445442015-02-24T08:42:00.002-08:002015-02-24T08:43:40.376-08:00Getting the USB dongle to work after latest updated in Ubunutu 14.10After updating the Ubuntu 14.10 my BandRich C120 dongle stops working. The network manager couldn't detect the modem. While looking into more i found out that actually the udev fails to switch the dongle into modem mode. It was not a problem with the udev or udev rules, but instead it was something to do with the usb_modeswitch which didn't react to what udev rules passed in when calling it.<br />
<br />
But after some time spending playing around with udev and usb_modeswitch, i found a way to write a udev rule which will perform a eject operation against the dongle using usb_modeswitch which will make the dongle to switch into modem mode.<br />
<br />
Following is the content of the rule which is copied into<br />
<i style="background-color: #cccccc;">/etc/udev/rules.d/40-bandrich-dongle.rules</i><br />
<i><br /></i>
<i></i><br />
<i><span style="background-color: #cccccc; font-family: Courier New, Courier, monospace;">SUBSYSTEM=="usb", ATTR{idVendor}=="1a8d", ATTR{idProduct}=="1000", RUN+="/usr/sbin/usb_modeswitch -v 1a8d -p 1000 -K"</span></i><br />
<div>
<br /></div>
<div>
If you facing the same issue and don't own the same type of dongle, just find the vendor and product id and change the rule criteria so that it will work for your dongle as well if its supports switching the mode by performing a eject operation.</div>
<div>
<br /></div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-5937818027193306192015-02-20T09:38:00.000-08:002015-02-20T09:38:12.499-08:00Getting rid of startup applicationsRecently i needed to get rid of the hp toolkit box system stray app from my KDE box. This was not shown in the start application window as well. But then i looked at the deb package to get some hints, Lucky i came across the following path<br />
<br />
<pre><span style="color: #40015a;">/etc/xdg/autostart/hplip-systray.desktop</span>
</pre>
<br />
This was the startup program which is started the hp toolbox system tray. By simply removing this from the folder solved the problem of starting up hp toolbox system tray app.
Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-21636802844401035872014-02-22T05:10:00.001-08:002014-02-22T05:11:53.400-08:00How to configure Eclipse Mylyn with Google Code projectFirst you need to install/upgrade the latest <span style="font-family: arial, sans-serif; font-size: x-small;">Mylyn<span id="goog_101796152"></span><span id="goog_101796153"></span><a href="https://www.blogger.com/"></a></span> snapshot version which is 3.11 from this update site<br />
<a href="http://download.eclipse.org/mylyn/releases/latest" target="_blank">http://download.eclipse.org/mylyn/releases/latest</a><br />
<b style="background-color: white; font-family: arial, sans-serif; font-size: small;"><br /></b>
<span style="font-family: arial, sans-serif; font-size: x-small;">Then you need to install the Mylyn Web Template connector from the Mylyn Incubator which is at</span><br />
<span style="font-family: arial, sans-serif; font-size: x-small;"><a href="http://download.eclipse.org/mylyn/incubator/3.11" target="_blank"> http://download.eclipse.org/mylyn/incubator/3.11</a></span><br />
<br />
After following the above steps you will have a Mylyn installation with Web Template connector in your Eclipse IDE.<br />
<br />
The next part is configuring the web template connector to read issues from google code issues. There are lot of articles and posts on how to do this. But the following article was the one which worked for me with the above Mylyn version.<br />
<a href="http://alblue.bandlem.com/2009/04/google-code-and-mylyn-redux.html" target="_blank">http://alblue.bandlem.com/2009/04/google-code-and-mylyn-redux.html</a><br />
<br />
<br />
After configuring it you will be able to read the Google Code issues from Mylyn Task list :)Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-38712522625197776072013-07-25T08:39:00.004-07:002013-10-19T21:54:13.835-07:00Enabling Bluetooth file receiving on Gnome 3.8Well this applies to <b>Fedora 19</b>. With the default installation you will not be able to receive file from your Bluetooth device such as your smart phone. First of all you need to install the following libraries using your package manager.<br />
<br />
<h4>
<i>gnome-user-share </i><i>obexfs</i></h4>
<br />
Once the above libraries are installed, go into <b>Settings -> Share</b> and enable Bluetooth sharing and make sure you <b>"Save Received Files to Download Folder"</b>. After this restart your PC.<br />
<br />
Now you can pair your phone with the PC and send files to your PC.<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com4tag:blogger.com,1999:blog-1982579858245326131.post-64161333751093153502013-02-04T07:04:00.002-08:002013-02-04T07:08:04.099-08:00Git branch in bash prompt in boldIf you are using git in your linux box, i'm sure that you wanted the current branch your working to be displayed some where in the bash shell so that you don't need to do a <i>git branch</i>. Well i learnt recently its possible to show the current working branch in your bash prompt. And i wanted it to be highlited in bold which was not the way it was by default. After doing some reading how to customize the bash prompt i was able to get it done.<br />
<br />
First you need to have the bash auto completion package installed.<br />
<br />
Then you need to add the following line to you .bachrc file to import the git prompt function.<br />
<br />
<i>source /usr/share/git-core/contrib/completion/git-prompt.sh</i><br />
<br />
Then you need to customize the default prompt by adding the following line<br />
<br />
<i>export PS1='[\u@\h \W\[\e[1m\]$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")\[\e[0m\]]\$ '</i><br />
<br />
Now open a new terminal and navigate to a git repo. Your prompt will look like below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgPnxiUj2axkc5bzTF7b9bkIn28rEZOBdiFIS8WbDWBoHgMJddIzmFnf3WfpNdq7j-z1yLjXl0udIYPdhvQNc5nz2Inv3-OC_7CeJcOOLjy6ijcfrQ9jAsnCWV2nwokGS907cWkWvB0Q8/s1600/Screenshot+from+2013-02-04+20:32:18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="67" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgPnxiUj2axkc5bzTF7b9bkIn28rEZOBdiFIS8WbDWBoHgMJddIzmFnf3WfpNdq7j-z1yLjXl0udIYPdhvQNc5nz2Inv3-OC_7CeJcOOLjy6ijcfrQ9jAsnCWV2nwokGS907cWkWvB0Q8/s640/Screenshot+from+2013-02-04+20:32:18.png" width="640" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-65530204597662344972012-12-26T07:59:00.002-08:002012-12-26T08:00:30.912-08:00How to disable screen blanking on gnome-shellWhen watching movies on gnome shell with VLC, the screen blanks out time to time. First it was from the timeout defined in brightness setting panel. But when i disable the screen off setting some how it started to happen with a 10 min timeout again. So when i googled i found out about the below shell extension.<br />
<a href="https://extensions.gnome.org/extension/241/yet-another-inhibit-suspend-extension-user-menu/" target="_blank">https://extensions.gnome.org/extension/241/yet-another-inhibit-suspend-extension-user-menu/</a><br />
<br />
But this didn't solved the problem as well. But this extension will stop gnome shell from being idle, which will avoid locking your screen. So now it was time to dig more into this problem. After going through various forums i found out that the xserver has a power management mode and a screensaver which will actually turn off the display to save power. And for my surprise this had a default timeout of 10 mints :).<br />
<br />
So i did a small modification to the above extension (which i will submit as a patch to the original developer later after some testing), which will execute the javascript statement on disabling screen locking :<br />
<br />
<i>Util.spawn(['xset', 's', 'off']);</i><br />
<br />
And on enabling screen locking :<br />
<br />
<i>Util.spawn(['xset', 's', 'on']);</i><br />
<br />
What the above "xset s" does is enabling and disabling the screensaver of xserver.<br />
<br />
So at least now i have a solution for VLC when watching movies. Hope that this support will added into VLC core soon so that we don't need to have a extra extension installed.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-12897267948334446762012-12-13T06:16:00.001-08:002012-12-13T06:16:51.005-08:00Gnome shell popup menu problem [Solved]Well if you are a gnome shell user and using eclipse for development you may have come across this bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=343278" target="_blank">https://bugs.eclipse.org/bugs/show_bug.cgi?id=343278</a>. Well some thinks its related to java and some thinks its related to SWT. But my friends its a gnome shell bug or i would say a feature that's not yet implemented :).<br />
<br />
My Story:<br />
I was sick of unity because of the slowness and high memory usage which is believe its really unnecessary. Yes Yes i know the memory are cheap these days, but still i don't like to wast my memory unnecessarily. <br />
<br />
So i went on searching for a DE that fits my needs, i tried gnome shell but gave up because of this problem.<br />
Then KDE ................ Hmmmmm nop not my choice feels bit odd, may be due to the fact that i was a gnome user for very long time now.<br />
Then i tried Cinnamon, well it was not the one i was looking for either. But for for my surprise it didn't had the right click problem. I knew that cinnamon was a fork of gnome shell and if cinnamon can fix this why not gnome :).<br />
<br />
Well i did some search on the cinnamon issue list and came across the following issue <a href="https://github.com/linuxmint/Cinnamon/issues/482" target="_blank">https://github.com/linuxmint/Cinnamon/issues/482</a><br />
<br />
Great now its time to find the change that they have done. So i went through the cinnamon commit history to find the changes and end up with the following commits.<br />
<br />
<a href="https://github.com/linuxmint/Cinnamon/commit/f8c7922777b102dc574bb3695fc649b89879ebab" target="_blank">https://github.com/linuxmint/Cinnamon/commit/f8c7922777b102dc574bb3695fc649b89879ebab</a><br />
<br />
<a href="https://github.com/linuxmint/muffin/commit/9e45c4c8f1cc2f92f266a5f8e1c4e83d4ce70ef1" target="_blank">https://github.com/linuxmint/muffin/commit/9e45c4c8f1cc2f92f266a5f8e1c4e83d4ce70ef1</a><br />
<br />
<a href="https://github.com/linuxmint/muffin/commit/0e575275078d4b8b518978448bba60f404b3746d" target="_blank">https://github.com/linuxmint/muffin/commit/0e575275078d4b8b518978448bba60f404b3746d</a><br />
<br />
Now you need to clone mutter and gnome shell code from the gnome git repository. Then you need to create new branches based on the 3.6.1 tag for both the projects.<br />
<br />
When appling changes you will need to map some files from cinnamon to gnome shell, muffin to mutter as follows since there are some file name differences.<br />
<br />
Cinnamon : <span class="js-selectable-text css-truncate css-truncate-target">src/cinnamon-global.c</span><br />
<span class="js-selectable-text css-truncate css-truncate-target">Gnome Shell : </span><span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target">src/shell-global.c</span></span><br />
<br />
<span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target">Muffin : src/meta/compositor-muffin.h</span> </span></span><br />
<span class="js-selectable-text css-truncate css-truncate-target"></span><br />
<span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target">Mutter : src/meta/compositor-mutter.h</span> </span></span><br />
<span class="js-selectable-text css-truncate css-truncate-target"></span><br />
<span class="js-selectable-text css-truncate css-truncate-target"><span class="js-selectable-text css-truncate css-truncate-target"></span></span><br />
Now compile and install the changes. The problem will be solved :). I wonder why gnome shell developers are not considering taking this fix in from cinnamon :(. <br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-43887341449163407672012-12-01T23:12:00.000-08:002012-12-01T23:13:46.465-08:00Make firefox blends into gnome 3 shellRecently i decided to move the gnome shell due the unity being more memory hungry (still not greedy as windows) and slow. Gnome shell was fast for me and responsive that unity. So when i moved to Ubuntu Gnome Remix the default browser was Epiphany. I love the look and feel of it and the maximize mode which removes the titlebars to get more space. But still i miss firefox due to the add-ons I'm used to. So here comes the search for firefox add-on to make it look like Epiphany. i found the following add-ons which did the trick.<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/adwaita/?src=userprofile" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/adwaita/?src=userprofile</a><br />
Above Gnome 3 add-on will make your firefox looks more like a gnome 3 application with Adwaita theme.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMIBWX_b287KZT0LXl7DhrkWGVaA-OxSWU_Ib-JZ7iPlMVhOmo0Ta5QMvz_xtRcTjhsuhFmYdDv4voy_P8XBhepJjXq5nSu7jxcAJ921wYmEKDYPNNhsZJx1bOkidECh1WM3Mp5LLAyCY/s1600/Screenshot+from+2012-12-02+12:37:10.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMIBWX_b287KZT0LXl7DhrkWGVaA-OxSWU_Ib-JZ7iPlMVhOmo0Ta5QMvz_xtRcTjhsuhFmYdDv4voy_P8XBhepJjXq5nSu7jxcAJ921wYmEKDYPNNhsZJx1bOkidECh1WM3Mp5LLAyCY/s400/Screenshot+from+2012-12-02+12:37:10.png" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/htitle/?src=userprofile" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/htitle/?src=userprofile</a><br />
Above will hide titlebars when you maximize firefox.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDhe3BBRg4d-Gl80j8faLqVPWuh1JHaM0CvurXX9SFoBLyldl4gdP1YRj-mzgk3L80yDrIxXA2MqkxgQUnZU6X8OT8CH029cOV0XhmjDQDchqpRSJUr80V7RZH1Bg4IxqaxBpOiskbsIk/s1600/Screenshot+from+2012-12-02+12:38:57.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="49" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDhe3BBRg4d-Gl80j8faLqVPWuh1JHaM0CvurXX9SFoBLyldl4gdP1YRj-mzgk3L80yDrIxXA2MqkxgQUnZU6X8OT8CH029cOV0XhmjDQDchqpRSJUr80V7RZH1Bg4IxqaxBpOiskbsIk/s640/Screenshot+from+2012-12-02+12:38:57.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
<br />
Thanks for generous people who contribute on making those two plugins.Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-14486954889463672962012-11-05T06:34:00.000-08:002012-11-05T06:34:22.836-08:00Changing font size of view titles in Juno<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.blogger.com/blogger.g?blogID=1982579858245326131" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
If you are running the new eclipse platform which is 4.2 on linux you have already seen that the fonts sizes of view titles are pretty big. To adjust the font size for your prefference you need to edit the following file <b>e4_default_gtk.css</b> which is inside <b>org.eclipse.platform_4.2.1.v201209141800/css</b>. The version number might differ based on the updates you have installed in your sdk. The following entry in the above file needs to be change by providing the font size you would like to have<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9I3rHeSHaMqBSybwnezPaBh3KqhfZzy3AQagkm3lVse2idWrtg1n-dCXierhdJaDZaMhLrZjGobLFiYItK8xaUat527ytF0EBqoL3GgQYtLs7gvb3Hg9FlDnqb-lvsi-BoGWFP3KAjA/s1600/Screenshot+from+2012-11-05+19:54:14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9I3rHeSHaMqBSybwnezPaBh3KqhfZzy3AQagkm3lVse2idWrtg1n-dCXierhdJaDZaMhLrZjGobLFiYItK8xaUat527ytF0EBqoL3GgQYtLs7gvb3Hg9FlDnqb-lvsi-BoGWFP3KAjA/s320/Screenshot+from+2012-11-05+19:54:14.png" width="320" /></a></div>
In above as you can see i have changed the default size to 8. Now save the file and start eclipse. You will have nice view titles which will match to you preference :).Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-27108559889627465402012-10-08T08:56:00.002-07:002012-10-08T08:56:30.243-07:00Cloning a eclipse p2 repositoryThe following commands will help you to clone a eclipse p2 repository if you want to keep a local copy of a remote one. <br />
<br />
Below command will clone the artifacts:<br />
<br />
<i><b>eclipse -nosplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source <remote repo="repo" url="url"> -destination <local folder="folder" location="location"><br /></local></remote></b></i><br />
<br />
Below command will clone the meta data to same location:<br />
<br />
<i><b>eclipse -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source <remote repo="repo" url="url"> -destination <local folder="folder" location="location"><br /></local></remote></b></i><br />
<br />
Below command is optional, But if there are any missing meta data it will create them for you:<br />
<br />
<i><b>eclipse -nosplash -application org.eclipse.equinox.p2.publisher.EclipseGenerator -source <local folder="folder" location="location"> -features <local folder="folder" location="location">/features -bundles <local folder="folder" location="location">/plugins -artifactRepository file:<local folder="folder" location="location"> -metadataRepository file:<local folder="folder" location="location"> -destinationName "<name for="for" repository="repository">" -append -verbose -ignoreErrors -inplace<br /></name></local></local></local></local></local></b></i><br />
<br />
<b>Sources :</b><br />
<a href="http://wiki.eclipse.org/Equinox_p2_Repository_Mirroring">http://wiki.eclipse.org/Equinox_p2_Repository_Mirroring</a><br />
<a href="http://wiki.eclipse.org/Equinox_p2_Metadata_Generator">http://wiki.eclipse.org/Equinox_p2_Metadata_Generator</a><br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-64640388832845387742012-08-31T07:18:00.000-07:002012-08-31T07:37:44.884-07:00Eclipse feature patch not getting installedRecently i was trying to modify an existing eclipse plugin to make it work with JUNO. The orginal plugin was installed without problem in JUNO but when trying it fails to find some classes since there are API changes in the platform.<br />
<br />
So i patch the original plugin with the new API and ran the plugin using eclipse and it works successfully. Now it was time to make it a package so i can install the patch without modifying jar files manually. So i read about how to create a eclipse feature patch which was exactly what i was looking for. So i created the patch and when i try to install it i was getting the following error:<br />
<i> [patch name] is not applicable to the current configuration and will not be installed</i>.<br />
<br />
So what i though was that some thing wrong with the plugins that contained in the feature patch. So i first tried by replacing the new classes in the original plugin jar and changed the manifest to include the new API dependency. And it worked. So now i was sured that my plugin code was not the problem. So i them replaces the original plugin jar with my patched plugin jar and this cause the plugin to disappear. So now it seems some thing wrong with my manifest of my patched jar.<br />
So i went through the manifest of my patched plugin once again and i saw that i have messed with a dependency. The problem was a dependency plugin version was mentioned with a qualifier which actually didn't included in my feature patch. So my patched plugin fails to load because that version cannot be found at runtime. But when i run through eclipse that it works because the dependency plugin project is there in my workspace. Fixing the version solved the problem with the installation and the feature patch was successfully installed.<br />
<br />
So for starters with eclipse platform plugin development like me, if you get the above error check you plugin manifest whether it is correct for the target runtime environment.Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-87774630551763922742012-07-05T06:02:00.001-07:002012-07-05T06:02:10.848-07:00Should we unit test legacy code?<div><p>This is a more frequent question I hear from my colleagues. Well my answer yes provided that the code will not thrown out tomorrow and the cost of writing will not eat up your budget.</p>
<p>Well there are some challenges to this especially with legacy code.  Well you need to refactore your code so it's mockable in areas you need to mock. I know there are people who says<b> </b><b>"Don't touch that code if its working."</b> Well aren't you already touching it. What harm it will do if I do bit more changes and refactor the code so that's testable and I can test it and make sure I don't break any thing. Do we need to live with that stinking code forever. The more you modify the more it will stink if you don't clean it today. </p>
<p>Well personally I don't agree with it. If the cost you put today will have good ROI then we should do it. This will secure your legacy code from future modification too.</p>
<p>Well we should consider unit testing as tool that you will use to verify your code you just wrote. if you are following TDD this really easy.</p>
<p>So I wish some day the people who say no to unit testing or people who thinks its a wast of time will find its advantages and power :)</p>
</div>Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-2544414396575992292012-04-22T06:41:00.001-07:002012-04-22T06:43:51.069-07:00Updating Nokia E66 on VirtualBoxWell i wanted to update my wife's phone software which is a Nokia E66. I don't have a separate windows installation on my pc since i'm using Ubuntu. So i normally keep a window installation in a VirtualBox vm for emergency cases like this. <br />
<br />
Well when i tried to start to update in the Nokia Suite it just switch of the phone which will be in kind of like sleep mode. After some time the Nokia Suite reports the connection is interrupted. Well first i though its some thing to do with the phone. Well then again i though may be i should look at the usb connections available. Because in the Nokia Suite massage it says to restart the phone to try to run the update process again. So that means the phone is not switched off, its in a mode which the user interactions are disabled.<br />
<br />
So what i did was, i created a empty filter criteria in the vm usb settings and then start the update operation again. So as soon as the phone screen switch off for my surprise when i look at the usb device connections i saw some thing like <i>"Nokia ROM ....."</i>. So i selected that. This cause the Nokia Suite to show some progress in the progress bar. The easiest way to find out whether your phone is switched it's mode is
the usb activity indicator in the VM status bar. If its idle that means the phone has
switched it's mode.<br />
<br />
So for this phone it switches in the three modes before it restarts the phone. After the restart the phone had the new version of the software and the feature that is stated in the update information. Hope this will be help full for some one who is primarily not running windows but on a OS which can run VirtualBox.Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com2tag:blogger.com,1999:blog-1982579858245326131.post-24412200920798832752012-03-23T07:53:00.001-07:002012-03-23T07:53:00.954-07:00My Git-SVN ExperienceWell some time back i started to use Git at my work place so i can share the code with my fellow developers when doing parallel development. The main reason for this is that the code was not ready to be push to our central repo.<br />
<br />
Well then i though of giving a try with git-svn so i can create topic branch and work on it, share it and then when things ready, commit it to central repo. But the first thing i saw from my fellow developers was a unhappy face :(.<br />
<br />
Well there is a reason for this. Because git have lot of advance functionality which make you possible to do things that you even don't think of. And their alternative commands for same task which make most of people confuse (including me some time back) and using those in wrong places will put you in trouble. <br />
<br />
Well i tried git-svn for first time and the cloning of the repo was fine. But it was fine on command line not in the tortiseGit UI. And before committing back to central repo i was force to svn rebase (even though there was no changes in the central repo after i cloned) and dcommit which i guess is bit confusing for some users. It also took a long time to commit a change with few local revisions which got success after retrying for the second time. Even though it was OK with me, but we need some thing more simpler which gets the job done quickly with out the need for going through manuals to find out descriptions of various commands.<br />
<br />
So i though to give a try to bzr which also have a svn integration. But that will be in another post :).Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-84174739856133137512011-10-22T08:27:00.000-07:002011-10-22T08:28:02.091-07:00Installing Avidemux on Ubuntu 11.10Well for Ubuntu 11.10 the video editor (converter for me :) ) avidemux is not yet ready. So i though of finding a way to install this may be from an older release of Ubuntu to give it a try. <br />
<br />
I chose natty since its more close to oneiric even though oneiric is based on Gnome3 and Natty is based on Gnome2. So i downloaded the debs from <a href="https://launchpad.net/ubuntu/+source/avidemux/1:2.5.4-0ubuntu6/+build/2158020">https://launchpad.net/ubuntu/+source/avidemux/1:2.5.4-0ubuntu6/+build/2158020</a><br />
. Well when i tried to install the debs i got a error saying it cannot continue because avidemux-plugins-common_2.5.4-0ubuntu6_i386 is looking for libx264-106. But oneiric comes with libx264-116. So though to give a another try by changing the dependency version in the deb. To edit the deb file i used the scripts at <a href="http://ubuntuforums.org/showthread.php?t=636724">http://ubuntuforums.org/showthread.php?t=636724</a> thanks to the guys up there who post the bash scripts. I change the libx264-106 to libx264-116 and save the deb.<br />
<br />
Well then i again try to install and this time it works, and i open up avidemux and try to convert a video for my droid and it worked great. So i hope this post will help you if your looking for avidemux on oneiric.<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-7160729318658230672011-10-20T07:54:00.000-07:002011-10-20T07:54:37.448-07:00Terminal launcher with drag and drop location for Unity<span style="font-size: x-small;">The following launcher configuration will allow you to add a Gnome Terminal launcher into your unity launcher bar. This has the ability of opening the terminal for a given folder which. To do that you can simply drag the folder onto the launcher shortcut which will open the terminal in the dropped folder. The motivation behind this effort was that the open terminal nautilus extension is not working properly with nautilus 3.2 right now on my Ubuntu 11.10.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoeY5httY3XIW9KkpkTL2MHhcYaBdEimjGzSB8ogaAa6ndnzeozvlCt3b4Us3YblV16mXZeqeunBOeTxYAVY-qTT3cp7PlnQMxPz3kBKgzujfuT2WOCEyejpi12RjZLguKGLz4HEZd75A/s1600/Launcher.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoeY5httY3XIW9KkpkTL2MHhcYaBdEimjGzSB8ogaAa6ndnzeozvlCt3b4Us3YblV16mXZeqeunBOeTxYAVY-qTT3cp7PlnQMxPz3kBKgzujfuT2WOCEyejpi12RjZLguKGLz4HEZd75A/s320/Launcher.png" width="320" /></a></div>
<br /><span style="font-size: xx-small;">[Desktop Entry]<br />Version=1.0<br />Name=Gnome Terminal<br />Comment=Drag and drop a folder to open in.<br />GenericName=youtube uploader<br />Exec=gnome-terminal --working-directory=%u<br />Terminal=false<br />X-MultipleArgs=false<br />Type=Application<br />Icon=gnome-terminal<br />Categories=GTK;Graphics;<br />MimeType=inode/directory;<br />StartupNotify=false<br />TargetEnvironment=Unity<br />X-Ayatana-Desktop-Shortcuts=NewTerminal<br />[NewTerminal Shortcut Group] <br />Name=New Terminal<br />Exec=gnome-terminal<br />TargetEnvironment=Unity</span>Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-53102837930057013292011-10-06T06:35:00.001-07:002012-02-01T04:50:24.364-08:00My experience with Screenlets and Conky<div><p>Last few days I looking for some thing new for natty desktop after sysmonitor screenlet gave up on me. Well my options were<br>
1. Running plasma under gnome.<br>
2. Conky.<br>
3. Continue with screenlets.</p>
<p>Well the first option I gave up soon as I saw how to get it running. Damn I'm not ready to give up Nautilus desktop to plasma :D. So next option was to try out was conky. Well it was not quit good experience to get it up and running. Since it didn't had a GUI to manage the widgets it was bit hard at first. Then I thought to give it up and update the existing screenlet installation using the PPA. Well again I though why I should I sacrifice my memory (since screenlet took nearly 9mb per each widget) I gave a another try on lovely conky. Well I must admit that I was enchanted by the lovely widget which was there on OMG and Davianart. It took less memory as well (around 2mb). Well going through the manual helped me alot. And nice thing is the concky script syntax was really easy to catch-up when compared to learning python :). It turned out to really nice once I did some changes in widget and ran it to see how it looks like. And chaging the script cause the widget takes changes instantly which is really great.<br>
So I think I'll let go screenlets and stick with conky :)</p>
</div>Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-27613171878620182152011-06-20T06:17:00.001-07:002011-07-20T05:40:27.465-07:00Using GIT with Subversion<div><p>In this post I will go through how to use git together with subversion side by side. Lets say your working in project which uses subversion as the SCM. But you and your team is asked to implement a CR. Now you have a requirement to share the code between your team members while you are working on different parts of the CR. One way is to commit changes to main repo. But if you have CI this will lead to build failures which is not good. So the other option is to use a searate repo for you requirment. So I have choose git for this. Its because it will not conflict with your svn metadata. And its distributed, therefore you don't need to setup a seperate server for this.</p>
<p>Here how you do it:<br>
1. First tell one of your team member to checkout the project from subversion. </p>
<p>2. Then create a git repo for your project. </p>
<p>3. Create a .gitignore file and add the following line to avoid .svn metadata folders getting into to your git repo.</p>
<p>.svn/</p>
<p>4. Now add all files you want to track onto git index. Add the rest of the files you don't like to track by git in to ignore list. </p>
<p>5. Then commit the changes to the git repo.</p>
<p>6. Now tell the other members to take a copy of your .git folder and past it into their project folder. After doing that they can do a hard reset which will sync the working tree with the git repo that was just copied.</p>
<p>7. Now they need to add your repo as a remote repo. You need to share your project directory to do this. </p>
<p>8. Then they can do a fetch and do a merge to make sure it works fine.</p>
<p>9. Now you could add them as remote repo as well and do step 7 to make sure its working.</p>
<p>10. Now you all can work on your working copy as you wish and commit things into your local repo when you think it's done and ok to share with other members.</p>
<p>11. To get your changes they need to do a fetch and merge.</p>
<p>12. If they get a conflict during the merge git will not commit the changes. So they need to resolve them before committing. One way to do it is by manually resolving the conflict by using git merge tool. Other way is checkout using --ours or --theirs options. The first will keep the original file and ignore the remote changes. The second will do the opposite. After resolving the conflicts you need to add the files into the index and commit the merge changes.</p>
<p>13. If change your mind and want to revert the merge because you got conflicts, then do a hard reset which revert the merge. </p>
<p>14. When its time to commit changes to subversion, then you can do it using your favorite subversion tool. This will not be a big task since you have the svn metadata. One thing important is to do this commit by one person always. Other wise you see conflicts because you have the same change in your working copy with different subversion metadata since you have taken those changes from git. But its matter of ignoring those conflicts since you know they are not and committing the changes you want to subversion. </p>
<p>If you get things configured correctly you will save lot of time in applying patch files and copy past code here and there. But if you not get it configured correctly then you will loose lot of your time on just trying to share the code. Time is money for your managment ;).</p>
</div>Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-4819648475088211882011-05-01T07:13:00.000-07:002011-05-01T07:20:20.334-07:00Skyline movie sucksWatching the skyline movies was a total wast of time. Thank god it was only 1hr 30min :D. Its a movies with lots of special effects and no story behind it. I preffer to watch over the Transformers series or The Independence Day over this one.Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-26983489360816179752011-04-07T07:40:00.000-07:002011-04-07T07:47:59.806-07:00Welcome WindowBuilderGood news for all Java GUI Developers. Finally the day has come where we can enjoy the WindowBuilder when creating Swing GUIs. This was a commercial product some time back but now its taken by google and its OpenSource. So lets start using it and help the community to make it more feature rich.<br /><br />More information can be found at <a href="http://googlecode.blogspot.com/2010/12/windowbuilder-becomes-new-open-source.html">Google Code Blog</a><br />The plugin can be downloaded from <a href="http://code.google.com/javadevtools/wbpro/">http://code.google.com/javadevtools/wbpro/</a><br /><br />Enjoy.Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0tag:blogger.com,1999:blog-1982579858245326131.post-42420775587293111662011-01-08T04:20:00.000-08:002011-01-08T04:47:51.474-08:00Using GIT on windows without starting a new cmdIf you install the portable GIT from <a href="http://code.google.com/p/msysgit/">http://code.google.com/p/msysgit/</a> for windows you will need to set the installation path in to your PATH variable in windows. And when you start git from the command line it will open another command line which is opened in your home directory. This was something made me go crazy so i though to find away to run git within the command line i opened like i do with SVN. Well i didn't try the windows installation in msysGit site and try the same thing with the command line because i always prefer zipped installations on windows. I guess that's some thing you can try :).<br /><br />So when going through the git-cmd.bat file i found away to get it running as i wanted. Here is what you need to do.<br /><br />Create the following environment variable with the values :<br /><ul><li>git_install_root = "[folder where you extracted the zip file]"</li></ul>Add the following entries to the PATH variable :<br /><ul><li>%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;</li></ul>Now open the new command line and type git. You will get the git help text :).Anonymoushttp://www.blogger.com/profile/12730926322192245139noreply@blogger.com0