Nadav and the wonders of the web


Archive for the ‘linux’ Category

What Microsoft is doing RIGHT and why open-source is LOOSING

Thursday, March 27th, 2008

It had been a while now that I’m reading about how Microsoft is going down and open-source is going to rule the world. Lately I’ve been giving this issue some thought and wanted to share my conclusions, so here goes:

  1. Scattered resources - Microsoft has many(many!) developers\QA\design… people working for them while open-source projects which has the advantage of being able to recruit "all" the developers in the world actually has much much less than that working for them. What happens is just another example of human nature, when people are not told what to do, they will do what ever they want. This means that we end up with many open-source projects working on the same things. The problem of open-source is not that the resources are limited but that they are unlimited and scattered.
  2. Advertising - There isn’t much to say here which is not self implied, but still, remember that the power of advertisement when it comes to the general public is HUGE.
  3. Where used to it - I know many people trying out Linux or other open-source platforms, but no matter what, what they are looking for is the similarity to Microsoft Windows. Microsoft has us by the *alls here and we can all say "well if we won’t change it, it won’t change" but the poor truth is that people don’t like to try new things and evolve.
  4. Awesome IDE - admit or not, Visual Studio is an amazing program. I don’t think there is another IDE that will compare, that means the developers use Microsoft which means they develop for Microsoft and that means you get the old "I can’t switch to Linux, there are no programs…" argument which is not true but again, people don’t change.
  5. Community - At least when it comes to the community we can say that the BIG open-source projects have a community to match or at least be at the same league of the Microsoft community(the world).
  6. Evolving - We are witnessing the past few years that even a company as big as Microsoft can evolve, maybe not as fast as open-source but we are seeing the Live! Office coming to life and other new projects.
  7. Force in numbers - If you think about it, they’re so big that if you piss them off they can just sit on you.

This reasons and many others bring me to the believe that even though people don’t like Vista and even though it is cool to hate Microsoft we are looking at one big company that is not going anywhere and is actually going to win.

What do you think?

Nadav

The Ultimate Firefox setup!

Wednesday, March 26th, 2008

After writing a post about the best Windows setup I realized the setting up Firefox to max its potential can be just as or even more complicated. So, here I will detail what i believe to be the Ultimate Firefox setup!

Preferences:

Go to Tools->Options

  1. On Main tab - I would set up my download folder here so when I download files they won’t just end up on my desktop. Choose Save files to and browse to the folder of your choosing.
  2. Tabs tab - We’ll use an add-on for this one.
  3. Privacy tab - You might want to mark Always clear my private data when I close Firefox and choose the correct Settings for you. this is good for security reasons.
  4. Security tab - I HIGHLY recommend you use a master password for all your saved passwords, it is really no hassle and adds a very important security layer. Just mark Use a master password.

I didn’t talk about any other thing in the options because the rest of the default values seem fine to me.

Add-ons:

This are add-ons I use and find helpful for fun and productivity.

For setting up specific add-on settings go to Tools->Add-ons->[add-on name]->Options

  1. Download Statusbar - Gives you a small downloads status indication at the status bar.
    After install and restart choose in it’s settings:
    Top right Mini Mode.
  2. Fasterfox - Does different optimizations to your Firefox installation so it will run much faster.
  3. Firebug - This might be the best one in the list. If you are a web developer this is the extension for you, extensive all-web related features. viewing and editing in real time of DOM,CSS,HTML,JS… and a JS console and a view of all requests sent including AJAX requests.
    And what I consider to be the coolest feature, live JS debug with breakpoints !
  4. Flashgot - When combined with a download manager (Flashget\GetRight\DAP…) enables to send to download all links in a page, links marked, building a gallery of picture\video and many many more.
  5. Forecastfox - Weather in your status bar. Personally I change the settings so it will only show icons and just when I hover above one give me more details.
  6. Foxmarks Bookmark Synchronizer - Does exactly what the name says. I use this to keep a backup of bookmarks and at the same time keep my Portable Firefox synched with my standard installation.
  7. IE Tab - Enables viewing of pages using IE’s engine inside Firefox. Very useful for web-developers or just people that use non-standard web sites.
  8. Long Titles - Makes sure that the image tool tips will show completely.
  9. Master Password Timeout - If you wish your master password will expire every so minutes than use this extension.
  10. ProfileSwithcer - Firefox add-on developers or just people that want a clean\different profile for normal usage can install this for a quick and easy switch.
  11. Resurrect Pages - Don’t you just hate it when you go to some site and get the 404 missing error ? Well, this extension lets you view this page from many different web cache archives, can be very useful at times.
  12. Tab Mix Plus - Adds a whole lot of features for the Firefox tabs. I highly recommend going through it’s settings and setting it to your liking.
  13. Update Notifier - Notifies of new updates to the main Firefox program and to add-ons.
  14. Web Developer - A must have for web developers, just get it and explore all the wonderful options. this does not conflict with Firebug, they complete each other.
  15. iFox Smooth - A nice theme I have been using for a while now.
  16. JAJAH Click-to-call - Last but not least, our very own. - adds telephony functionality to your pages with number recognition and other cool features.

I recommend going through each new add-on you install and its various settings options and choosing what is right for you.

Tweaks:

Write at the address bar about:config and now we are going to search for values and change them, if a value does not exist, add it.

This is a little more complicated and dangerous for your Firefox installation so use at your own risk.

I found a few good articles about this specific subject so I will link to them and leave the fame to who ever deserves it.

  1. Link 1
  2. Link 2

– — – — – — – — – — – — —- —- —- —- —- —- —- —- —- –

Hope this helped you.

Tell me what is your ultimate Firefox setup in the comments.

Some credit goes to Lifehacker for ideas.

Cheers,
Nadav

A few useful Linux commands for the newbie

Saturday, February 16th, 2008

Here is a list of a few useful Linux commands for us newbies. =]

This are most of the commands that i have come to use in Linux, this are the ones that I think it’s worth to at least know. You never know when it will come in handy…

  1. ls - Works the same as “dir” in DOS, lists all the files and folders at the current path.
  2. cat filename - Pasts the contents of filename to the screen.
  3. man command - Loads the manual file for the command\program.
  4. wget url - I think this actually a program but it will most likely be available on every Linux system you will use. It fetches the file\page at the url.
  5. mkdir name - Create a directory named name.
  6. rm filename - Delete filename.
  7. rmdir foldername -Delete foldername.
  8. ps - Lists processes.
  9. passwd - Change the password of the current user.
  10. chmod - Read about this one, this is used to change the rights regarding read/write/execution of a file or folder.
  11. chown - Used to change the owner of a file or folder.
  12. cp filename1 filename2 - Used to copy files from filename1 to filename2.
  13. df - Used to review hard-drive space, personally, I use it with “-hT”.
  14. fdisk /dev/*** - Used to partition a hard-drive, usually the drives location will be /dev/hda or /dev/sda or /dev/hdb and so on…
  15. find key - Find files on the file system. I am not very familiar with it but I know that sometimes you would prefer to use locate.
  16. grep regularExpression- used to find lines that correspond with the regularExpression usually used in parallel to another command like ps. [ps | grep cups]
  17. ifconfig -Lists the available network adapters and their status.
  18. kill - Stop a process by PID[Program ID].
  19. killall - Stop a process by name.
  20. lsmod - Lists currently loaded modules[this is a subject of it's own].
  21. rmmod mode - Unload a module from the kernel.
  22. lsusb - Lists all USB devices.
  23. mount - Used to mount a device/partition to a certain path.
  24. umount - Used to un-mount a device/partition.
  25. dig serverAddress -Used to query the DNS server.
  26. sftp - ftp, but secure!.
  27. ssh address - Connect to a SSH server at address.
  28. su username - Start using the shell as username.
  29. sudo command - Run command as if you were root. This command is currently used in many different distros to re-authenticate the user in order to make sure this is not some kind of a harmful program.
  30. tar - Create or restore file from a tarball.
  31. traceroute address - Shows the entire route it takes a request in order to get to address. Useful when trying to find bottle necks in networks.

For more info on any of this commands either use “man” or call the command and “–help” or “-h” after the command(or click the link…). It should list the different possibilities of usage to that command.

Hope this helps you with your Linux endeavours. BTW - most or at-least some of the commands should work on UNIX based systems as well. This is due to the fact that both Linux and UNIX adhere to POSIX.

Until next time, have a good one! =]

Nadav

How to run a system command from a PHP page.

Wednesday, January 2nd, 2008

Using PHP to run system command on the server side can come in very useful in many occasions.
Some examples:

  • Using an online storage service for your site that doesn’t give you shell access.
  • Running this during an application logic.

I will give here the main idea of this technique and a few code examples of useful commands to use with it.

Downloading a file to the server:
When I upgrade my WordPress installation I don’t want to download all the files to my personal PC and then re-upload them to the server so what I do is, I use this command to download the files:

<?php system('wget http://url-to-download-location/filename.zip'); ?>

Then I unzip the file using this command:

<?php system('unzip -o filename.zip'); ?>

The -o means it will overwrite existing files without asking so I would use that one with caution. be warned.

As you probably gathered by now the way to run system commands from php is very simple, just put the code:

<?php system('command'); ?>

And that is it. all you have to do now is go to your browser and access the URL of the php file.

http://yoursite/yourPHPfile.php

And the command will run =]

’till next time, have a good one =]

Nadav…

Jajah is the VoIP player that brought you web-activated telephony.