Home

Advertisement

Customize

Shantanu Oak

Oct. 18th, 2009

06:16 am - Customizing gedit as a Web Developer’s IDE

There are very simple changes those you can make to your favorite text editor "gedit" to make it a ppwerful developer tool.
Personally, I like to have the following preferences set from Edit menu:

* View >
Uncheck "Enable text wrapping"
Check "Display line numbers"
Check "Highlight current line"
Check "Display right margin" and set to 80. (I manually wrap my code at 80 characters)
Highlight matching bracket (when cursor is at a bracket, it's pair is highlighted as shown in the image above).

* Editor >
Check "Use spaces instead of tabs" and set "Tab width" to 4. (We can use modelines to change this from file to file)
Check "Enable auto indentation"
Uncheck "Create a backup copy of file before saving". (I manually backup everything before I start work)

* Font and Colors > Uncheck "Use default theme font" and set "Editor Font" to "Monospace 10".

* Plugins tab > check the box next to 'File Browser Pane' and tag list.

http://www.micahcarrick.com/09-29-2007/gedit-html-editor.html

Tags:
Current Mood: [mood icon] impressed

Mar. 5th, 2009

11:05 am - extracting rar files in linux

# wget http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
--12:01:13-- http://www.rarlab.com/rar/rarlinux-3.6.0.tar.gz
Resolving www.rarlab.com... 217.70.129.242
Connecting to www.rarlab.com|217.70.129.242|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 752997 (735K) [application/x-gzip]
Saving to: `rarlinux-3.6.0.tar.gz'

100%[=======>] 752,997 27.3K/s in 29s

12:01:45 (25.6 KB/s) - `rarlinux-3.6.0.tar.gz' saved [752997/752997]

# tar -zxvf rarlinux-3.6.0.tar.gz
rar/
rar/file_id.diz
rar/license.txt
rar/Makefile
rar/order.htm
rar/rarfiles.lst
rar/rar.txt
rar/readme.txt
rar/technote.txt
rar/whatsnew.txt
rar/rar
rar/rar_static
rar/unrar
rar/default.sfx

# cd rar
# cp rar unrar /bin

Tags:
Current Mood: [mood icon] happy

Nov. 20th, 2008

02:38 pm - Remove junk in Linux

Sometimes you'll end up with carriage returns on each line in a file originally created on a DOS/Windows system, or filenames with spaces, tab, or other control characters in them, but you can't see them typically.
The cat command provides three useful options -v, -e, and -t that will let you understand these invisible characters
-v (displays non-printing characters)
-e (prints a "$" at the end of each line to indicate a NL character)
-t (prints "^I" for each Tab in the file)
cat -vet filename |more

Tags:
Current Mood: nerdy

Oct. 2nd, 2008

05:57 pm - Sorting in Linux

[root@localhost ~]# cat testme.txt
this is a test
food that are killing you
wings of fire
we hope that the labor spent in creating this software
this is a test
unix ips as well as enjoy our blog

[root@localhost ~]# awk '!x[$0]++' testme.txt
this is a test
food that are killing you
wings of fire
we hope that the labor spent in creating this software
unix ips as well as enjoy our blog

[root@localhost ~]# sort -u testme.txt
food that are killing you
this is a test
unix ips as well as enjoy our blog
we hope that the labor spent in creating this software
wings of fire

[root@localhost ~]# sort testme.txt | uniq -u
food that are killing you
unix ips as well as enjoy our blog
we hope that the labor spent in creating this software
wings of fire

Tags: ,
Current Mood: geeky

Jan. 6th, 2006

12:09 pm - Mobile phones

Then I remember my "other" personal computer. The one in my pocket. The one that gives me always-on Internet access, any time, any where. So I whip it out, start up one of the two web browsers installed on it, go to the Google site, type part of the error message above into the Google search form, and lo and behold, I get hits. Not a lot, but enough -- including the following one:

http://www.nabble.com/fsck-errors-on-boot-t758939.html

That's an archived copy of discussion that took place just last month on the debian-user mailing list, and I find that it describes the exact problem that I'm seeing -- along with describing the likely cause for the problem: a buggy version of the Debian package for e2fsprogs.

So I turn my attention back to my PC, cd to /var/cache/apt/archives, and check the archived versions of e2fsprogs. Sure enough, I find that I recently updated e2fsprogs from a package showing a timestamp from the middle of last month. So, I mount the filesystem read-write, run dpkg to downgrade to the previous version of the e2fsprogs package, cross my fingers, and reboot the machine.

...And I find God smiling down upon me once again. The machine completes its normal startup sequence without any failures, and I am back in the saddle again. Yee-hah!

http://www.oreillynet.com/pub/wlg/8934

Tags:
Current Mood: geeky

Dec. 28th, 2005

03:46 pm - Multisession Puppy 1.0.6

Puppy Live-CD that lets you save everything back to the CD!

http://www.puppylinux.org/user/downloads.php?cat_id=1

Tags:
Current Mood: [mood icon] amused

Dec. 17th, 2005

07:19 pm - Which distro?

That is one thing that has amazed me about Ubuntu, actually. I have run *MANY* distros over the last 10+ years, and have not run Windows since version 3.1 in 1995. I am used to having to do some work to get my X configuration correct, to get sound working at all, etc. I am now running Ubuntu, and have not had to touch a single configuration file. This is on a laptop, an eMachines M6805. The wide screen display (1280x800) was correctly configured - I had naturally expected it to choose 1024x768 and have to edit the xorg.conf to fix it. Sound works. It detected the wireless and built in ethernet, allowed me to select the wireless and enter my WEP key during installation, even the media keys (volume, mail, etc.) were properly configured. Later, I had to install Windows XP in order to load maps onto my GPS - since this machine is designed to run Windows, I didn't expect to have any compatibility issues, but *surprise*! The screen resolution was wrong, the wireless card was not detected at all, sound does not work. I don't know if it configured the media keys correctly or not as I have only had to run Windows twice, once to load maps and later to setup my DSL which unfortunately could only be done by running the Windows coaster which SBC sent me. I assume that all that doesn't work under Windows could be fixed by hunting around for drivers, but the simple fact that no such work was needed under Ubuntu whereas Windows is unable to make use of all of this Windows hardware was quite a surprise.

http://linux.slashdot.org/article.pl?sid=05/11/24/1826220

Tags: ,
Current Mood: geeky

Dec. 10th, 2005

09:46 pm - Are There Too Many Linux Distros

Each Linux distribution seems to have its own audience, its own personality, and its own advocacy or sales force. The Debian user may vociferously criticize Red Hat or SuSE, but enterprises which use Red Hat or SuSE probably would not find Debian agreeable. Similarly, distributions such as Red Flag Linux from China or Mandriva from France satisfy needs that US-based distributors do not or cannot.

http://opensourcestrategies.blogspot.com/2005/12/are-there-too-many-linux-distros_06.html

Tags:
Current Mood: [mood icon] thoughtful

Oct. 27th, 2005

09:39 am - POP3 Email Remover For Linux

http://eremove.sourceforge.net

Eremove is a simple application for linux, based on GTK, for logging into a POP3 mail account, quickly seeing a summary of everything that is there
waiting for you, and/or deleteing some or all of those emails painlessly.

Sometimes there is a large email blocking the mailbox, or lots of SPAM, or corrupted headers. With Eremove you can get rid of the unwanted mails easily,
and then go back to your favourte email client and get the rest of your emails.

COMPILING
--
Currently, it's pretty no frills in the compiling department.
Ensure you have gtk 1.x and the gtk headers installed somewhere, and then
simply :

make
make install

This will compile eremove, and install it to /usr/local/bin

RUNNING
--

To run Email Remover, simply run the command :

eremove

Tags: ,
Current Mood: geeky

Oct. 21st, 2005

08:15 pm - Live CD for system admins

MitraX is similar to any other live distribution -- you insert it in a CD or DVD drive and restart the computer. MitraX presents a boot menu with several options. Besides the usual system startup with the graphic environment, there is also a "no cache" mode, memtest mode, and win_pass mode.

If you choose the win_pass option, MitraX takes you into the Win/NT Registry Edit Utility, an interactive tool that lets you delete and change user passwords on Windows NT-based systems -- a useful utility for when if your co-worker forgets his password and can't log in to Windows. A second interesting option is memtest, which is useful for testing system memory for errors.

http://www.linux.com/article.pl?sid=05/09/30/2019219

Tags:
Current Mood: geeky

Sep. 20th, 2005

05:42 pm - Knoppix Network configuration

Connecting to a local area network

During the startup process, Knoppix will automatically detect the network card. For Local Area Network (LAN) access, Knoppix will automatically obtain an IP address from a Dynamic Host Configuration Protocol (DHCP) server. To check:

1. Click the Konsole button in the Panel (bottom row, 6th from the left).
2. Type this command and press Enter at the end of the line:
ifconfig
3. You should see a response like this:

This says the first Ethernet interface (eth0) has been given the Internetworking Protocol (IP) address "192.168.1.18". If the Ethernet card has been given an IP address, it means the card is working.

To double-check the connection, find out the IP address of another computer on your network. For example, suppose another computer has the address 192.168.1.1. Type this command and press Enter, replacing 192.168.1.1 appropriately:

ping 192.168.1.1

When the ping test fails, then give in a root shell the commands "ifconfig" and "route -n" and look if, using the results of these commands, the network card (/dev/eth0) and the router table are correctly configured..

Press Ctrl + C on the keyboard to cancel pinging.
Configuring the network card manually

If there is no DHCP server on your network, you will need to configure the network card manually.

1. Click the Knoppix menu in the bottom left corner.
2. Point to Network/Internet.
3. Click Network Card Configuration.
4. You will be asked if you want to use DHCP broadcast.
5. Click "No".
6. You will be asked to enter the IP address that you want to give to the first Ethernet interface. You need to know an IP address that is free on your network. You can't use an IP address that is already in use, or both computers will not be able to communicate.
7. Enter the IP address that you want to give to the card.
8. Click OK. Follow the prompts to complete the setup process.


Question: There is no "eth0", why not?

Answer: Check the network cables. If there is a DHCP server on your local area network, make sure it is running. Click the "Knoppix" menu, choose "Root Shell" and enter:

/etc/init.d/network restart
pump -i eth0

Try configuring your network card manually. If it still won't work it may mean your network card is not supported.

http://unit.aist.go.jp/itri/knoppix/knowing-knoppix/main/index2.html

Tags: ,
Current Mood: geeky