Customization Emacs

Melpa for emacs

Melpa is a Emacs mode repository. If you are not using Melpa on Emacs 24 you are really missing something.

Put this in your .emacs file.

Restart and run M-x list-packages

Bash Customization MAC org2blog Tutorial

Share shell history across multiple sessions

I use iTerm and a lot of terminal tabs. Terminal history is something which is important to me, it lets me backtrack my steps. Just add the following code in your .profile

Customization Programming Ruby Tutorial

Grab the net with Arduino

How to access a website with multiple virtual hosts from Arduino Ethernet Shield. The problem is if you have used Arduino Ethernet Shield, then you know that you can connect a IP, But if the IP has multiple virtual hosts, it will only connect to default virtual host. If it is commercial shared VPS, You wont be able to make your site default.

Gist is use of HTTP protocol which allows you to define host in your request on virtual host server. Here are the possible headers.

You should also provide basic debugging info like “User-Agent” etc.

Customization Programming Ruby Web

IRB Console with history and logging

I spend most time with IRB or Rails/console. These are good settings on which I have settled with over the time. These will allow you to have basic logging and IRB history. Just put these in the ~/.irbrc file (If file doesn’t exist then create one).

Customization Programming

Stop doing!

If you keep on doing what you’ve always done, you’ll keep on getting what you’ve always got.

W. L. Bateman

Multi-version environment on Windows

Working with command prompt on windows is messy. Working with multiple version of a language/compiler on windows is a trip to hell.

Possible workarounds are:

  • Set all the paths and add tags in names of binaries
    (stupid. You would have to remember all names or you will have to use some naming convention; still you will keep guessing).
  • Create users and set different versions in each user’s paths
    (Foolish. Then changing version will be like logging as different user).
  • Use a Customized Command Prompt
    (Elegant. Developers friendly)

How to Customize Command Prompt.

Create a file Called YOURSYSTEM-VER-cofig.bat. Where YOURSYSTEM is the name of the system you are using and VER is the version of that specific system like python-2.6-config.bat.
Now put some codes in the file. Like:

Then create a new shortcut Right click on empty space or File -> New -> Shortcut.

Create new shortcut
Create new shortcut

Then type %COMPSPEC% /K "C:pathtoyourfile" in it

Creating shortcut

Then Rename the shortcut to a proper name.

Rename shorcut to a Proper name
Rename shorcut to a Proper name

Then click on Finish. Now Right click on the shortcut.

Command prompt shortcut
Command prompt shortcut

Select shortcut properties.

Shortcut properties
Shortcut properties

We can set the Fonts of the Command prompt.

Shortcut properties.
Shortcut properties.

We can set the color of the command prompt. like BACKGROUND, FOREGROUND.

Shortcut properties
Shortcut properties

We can even set the buffer and the screen layout of the shell window.

Shorcut properties
Shortcut properties


Costomized command prompt
Customized command prompt

Now you are ready to enjoy this very good feature.

I recommend you to keep all these files in one folder say with name config-all and with attribute as hidden.