Some useful Google Chrome extensions that I use – Part 2

  1. SmoothScroll: As the name indicates, it allows smooth scrolling of the web page, makes chrome more elegant 🙂
  2. MiddleButtonScroll: A feature that I really wanted and couldn’t find at first on Chrome is the ability to click the middle mouse button and smoothly scroll upwards or downwards by just moving the mouse, this extension does exactly this!
  3. Stop Autoplay for YouTube: As the name indicates, whenever you open a youtube video, especially when opening many videos simultaneously in multiple tabs, it stops the video from auto-playing and guess what, it pre-buffers as well :), i.e. it starts loading the video as if you clicked the pause button.
  4. Webpage Screenshot: As the name indicates, it allows you to take screenshots of the webpages you browse, it can also add large pages – that require scrolling – in one screenshot.
Tagged , , , , | Leave a comment

Some useful Google Chrome extensions that I use – Part 1

  1. AdThwart: Blocks ads based on Firefox Adblock plus filter engine. I prefer this one to the others as it works exactly the same as Adblock plus on Firefox, and other seem buggy, up till now.
  2. Google Mail Checker Plus: Checks your Gmail, adds a little icon to the upper right corner of the browser and provides nice visual and sound effects to indicate any new incoming mails
  3. PanicButton: Don’t get caught :)), a single click or a keyboard shortcut can hide all your tabs and can even password-protect them not to allow anyone to recover the ones you’ve hidden
Tagged , , , , | Leave a comment

$@ is not "$@"

when you want to pass multiple parameters through you shell script, you use $@
ex:

#! /bin/sh
echo $@

and then execute this file:

./script1 hello world

the script will prints “Hello world”

But be ware, $@ is not “$@” !!

The story is, I wrote some Java file that accepts 1 argument from the command line, such like this:

public class SayHello{
public static void main(String[] args){
if (args.length != 1){
System.out.println("Usage: SayHello ");
System.exit(-1);
}
// do other staff here
}
}

I have wrapped this program in a shell file “sayHello.sh”:

#! /bin/sh
java SayHello $@

But the result was unexpected, as when I run with this command:

./sayHello.sh "Mohammed Hewedy"

I got

Usage: SayHello

I found the problem in the shell file, that I should use “$@” instead of $@
So, the script should be:

#! /bin/sh
java SayHello "$@"
Tagged | Leave a comment

Restarting USB Storage Modules in Ubuntu

sudo modprobe -r usb_storage
sudo modprobe usb_storage


It’s only because I had a problem in mounting any USB storage, it happened with me once
and I had to restart my machine, and I hate having to do so 🙂


Source

Tagged , , | 1 Comment

Download Videos From YouTube using Ubuntu

A very nice command-line tool that allows you to download videos from Youtube:

“sudo apt-get install youtube-dl”

After the installation process, run:

youtube-dl video_url

Tagged , , | Leave a comment