Tag Archives: developer

scp command in linux to transfer files from one server to another

To transfer your files from one server to another use following command set. login to the server to which you have to copy the files(i.e. destination server) scp user1@server1:/full/path/to/source/file . Press enter it ll ask for the source server password.Provide … Continue reading

Posted in Linux, developer | Tagged , , | View Comments

What am I up to …..

Hey fella

all these days, since quite a few months, I have been busy in to things. Things Things and these things. Its proving out to be a introspection period for me.

Realized… how much, is there to learn. Be it programming language, Algorithm or any other technology which I love or the normal human stuff. So much …. phewwww

Apart from usual stuff I have been playing around with latest symfony versions, jQuery and few unconventional stuff , not much of interest. Lately I have developed interest in other frame works specifically ROR, which is quite similar to Symfony in some aspects.

Don’t know why, but these days I think of starting a project every second day, New ideas come to mind and in day time they don’t seem to be valid one. More over I think of myself as an idiot :)

Procrastination the killer of all thoughts and creativity. I feel like trapped in to it, and not able to think.

Not able to focus and do things I want to do for quite some time now.

Bad part is I know what I need to change, but not getting enough energy to change the situation at all. I hope to do a come back soon. Reading.. reading.. and more reading could be one possible solution to keep out of these rubbish thoughts.

Its very important in ones life to have good mentors. Guess I am missing that very badly. :(

deepak Continue reading

Posted in General, Gyan By Me, developer | Tagged , , | View Comments

Snippet: Symfony & Propel–Queries with SQL functions

This is a super short snippet that I ALWAYS forget how to do! Often I want to build more complex where clauses with Propel Criteria which use SQL functions such as UCASE, LCASE, LEN and the date functions DAY, MONTH and YEAR. This is possible using Propel & Criteria, but how to do it is not immediately obvious.

The snippet below shows how to select objects from the database which were created in a specific month and year. Using Criteria::CUSTOM, it’s possible to specify a column and a comparison to do with that column. This is quite useful for doing things like building archive lists.

$c->add(MyObjPeer::CREATED_AT, ‘MONTH(‘.MyObjPeer::CREATED_AT.’)=’. $month, Criteria::CUSTOM);
$c->addAnd(MyObjPeer::CREATED_AT, ‘YEAR(‘.MyObjPeer::CREATED_AT.’)=’. $year, Criteria::CUSTOM);
A Note on Snippets: When using frameworks such as Symfony it is often the simplest pieces of code which are the hardest to either find or remember. These snippets are placed here for my own reference and will hopefully be useful to others. If you find them useful or have any suggestions, please let me know. Continue reading

Posted in Symfony | Tagged , , , | View Comments

Using Namespaces in Propel 1.5

Propel 1.5 does not cease to please the pace of development and introduction of new features, just a few weeks ago, Francois Zaninotto(project leader Propel) has published a new opportunity to edit the nested forms using mergeRelation and embedRelation and the other day to use Namespaces in the generation of models.

Propel 1.5 allows the use of Namespaces in files describing your model if you are using in the php version 5.3

Add the use of models is very simple:






A model class:

/ / Use fully qualified name
$ Book = new \ Bookstore \ Book ();
/ / Or use an alias
use Bookstore \ Book;
$ Book = new Book ();
/ / Remember to use the \ namespace for core Propel classes in this case
$ Con = \ Propel:: getConnection ();
$ Book-> save ($ con);
More details can be read in the blog Francois Zaninotto Continue reading

Posted in Symfony | Tagged , , , , , | View Comments

Restore Panels In Ubuntu Back To Their Default Settings

Hi All, I was updating my ubuntu 10.04 with some security patches. Everything worked fine but in between I messed up with my ubuntu top panel, and some of the icons went missing. I tried adding them using “add to panel” option, but I did not find it usable. As I don’t remember the default sequence of icons. Even after adding all of them it was looking weird.

So I started looking out for options which can reset my both panels (top & bottom). This what I found, hopefully some of you may find it useful.

NOTE: It worked for me on ubuntu10.04, I personally have not tested it on any other distro. Though It should work as expected.

Following commands would do the trick.

gconftool-2 --shutdown

(Note: There should be no spaces between the two dashes before shutdown.)

EDIT – My friend has suggested a better method instead of shutting down gconfd. Instead use the following command (thanks !)

gconftool --recursive-unset /apps/panel

(Remember: There should be no spaces between the two dashes before shutdown.)

Then enter the next command:

rm -rf ~/.gconf/apps/panel

And enter one more command:

pkill gnome-panel

That’s it! All the best. Continue reading

Posted in Technology, developer | Tagged , , | View Comments

How to uninstall / remove Ruby Gems (on Ubuntu)?

Hi All, I was trying to remove Ruby Gems on my lucid distro (ubuntu 10.04). I thought of posting it here for my own reference. Some of you might find useful.

First thing we need to find out is the exact location that the Ruby installs it’s libraries. In the terminal program, You can type the following command to find out the exact location.

ruby -e 'puts $:'

You’ll get list of paths. This is the output that I got in my machine.

/usr/local/lib/site_ruby/1.8
/usr/local/lib/site_ruby/1.8/i486-linux
/usr/local/lib/site_ruby/1.8/i386-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/vendor_ruby/1.8
/usr/lib/ruby/vendor_ruby/1.8/i486-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.8
/usr/lib/ruby/1.8/i486-linux
/usr/lib/ruby/1.8/i386-linux
.

Next we need to change our directory in to /usr/local/lib/site_ruby/1.8 and type following command to list the files.

ls -la
drwxr-xr-x 5 root root   4096 2009-07-15 12:15 .
drwxr-xr-x 3 root root   4096 2009-07-15 12:14 ..
-rw-r--r-- 1 root root   1415 2009-07-15 12:15 gauntlet_rubygems.rb
drwxrwsr-x 2 root staff  4096 2009-07-15 12:14 i486-linux
drwxr-xr-x 2 root root   4096 2009-07-15 12:15 rbconfig
drwxr-xr-x 6 root root   4096 2009-07-15 12:15 rubygems
-rw-r--r-- 1 root root  29116 2009-07-15 12:15 rubygems.rb
-rw-r--r-- 1 root root    268 2009-07-15 12:15 ubygems.rb

Now we are ready to remove the gems. Type

rm -r rubygems.rb ubygems.rb rubygems

If you wish to remove all gems installed in your computer, first find out the location by executing following commands

 which gem gem1.8

Next you can remove them by using following commands. That’s it!

rm -r /usr/local/bin/gem
rm -r /usr/bin/gem1.8

All the best. Continue reading

Posted in Technology, developer | Tagged , , | View Comments

Coding is a necessary but insufficient part of being a developer

Could not think of any better title to express what i wanted to. I was struggling to get my thoughts structured, so here I am posting the unstructured thoughts, I will make it better in coming weekend.

* In a small company setup, people wear multiple hats. It simply isn’t advisable to have a a guy who focuses on just one tiny area. Small companies need flexible people who are content and capable to step in and do whatever it takes to help the company succeed.
* One accountant or bookkeeper handles basically everything. There is often a utility infielder who is always busy but nobody knows what they do. The key concept here is flexibility.
* Big companies are more specific. Payroll is different from “accounts receivable” which is separate from “accounts payable”.
* Architects do design. Programmers write code. Technical Leads manage programmers. Program Managers keep the spec and schedule. Product Managers do positioning and message. Evangelists do, er, well, nobody really knows what evangelists do. :-)
* Anyway, each person has a specific, well-defined job. The key concept here is respect for boundaries

(In complete post….. do not assume anything, I am feeling sleepy)
CONTD……..

In a small firm, every developer is first and foremost a programmer. The bulk of their time should be spent writing code and fixing bugs, But every developer also needs to be involved in other areas such as the following:

…….zzzZZZZZzzzZZZZZZZ……..coming soon
Continue reading

Posted in Gyan By Me, developer | Tagged , , | View Comments
Get Adobe Flash playerPlugin by wpburn.com wordpress themes

DecentMind is Digg proof thanks to caching by WP Super Cache