Type Bangla/Bengali in Google Chrome

You can write Bangla in Google Chrome installing Automatic Bangla Typing extension I’ve developed! Previously, it had full support for Firefox, but the thing was not working in Google Chrome. Now I’ve fixed some bugs & it’s fully compatible in Google Chrome (16.0.912.77)

If you’re familiar with “Phonetic” layout, you can easily type Bangla.

How to Use

Download the extension from the link above. Then in any website, click a text-field where you want to type Bangla. After that, press Control + Y to start typing Bangla. You can press Control + Y again to switch back to English.

Check out this post for more details!

Fix Bangla Font in Google Chrome in Ubuntu

You need Solaimanlipi 2.0 for rendering font correctly in Google Chrome. You can download a copy of the font (customized by Saif Hassan) from the link below:

 

Download SolaimanLipi 2.0

 

The font above was “customized for Linux” – I don’t know much about this customization. So If you’re interested visit Saif Hassan’s post and download the font’s versions for Windows/Mac, if the font above does not work!

 

Install the Font

Double-click on the font and click “Install”

 

Enable the font in Chrome

 

Open Google Chrome and select the downloaded font as the screenshot below suggests:

 

Python Tutorial: Dictionaries (Key-value pair Maps) Basics

Well-formatting some of my old posts! 🙂

Shafiul Azam's Weblog

Dictionary in Python is a dat type also known as map. You may be already familiar with them, if using Associative Arrays in PHP or Hash-tables in C++ or Java. You may imagine a dictionary as an array, where instead of numericalindexes (the first element of array is indexed as 0, the second element indexed by 1 and so on) you can use stringindexes. Each element of a map is accessed (or, indexed) by an unique key, and so they are known as key-value pairs. Dictionaries are not sequences, hence maintains no left-to-right order.

Dictionaries are not sequences, hence maintains no left-to-right order.

Operations

You can create a map by the declaration: var_name = {key:value}

Code after “>>>” in following examples means: you need to type the code in Python command line. Any line not beginning with “>>>” indicates an…

View original post 37 more words

Send Commit Emails after users push in remote Git repository/server

Note: If you prefer to use terminal, you may need root access to use the following commands. If necessary, append “sudo” to all commands.

First, login to your remote server using ssh/ftp whatever. In your servers, say git repos are stored in /srv/gitosis/repositories directory (this is the default directory if you used gitosis).

Say, we’re interested in a repo called “myrepo.git” – it’d be available in /srv/gitosis/repositories/myrepo.git location.

Go to this folder. If you’re using terminal, you can type:

cd /srv/gitosis/repositories/myrepo.git

Some nice Description

Open file “description” and type whatever you want – text in this file will be sent in email’s subject as PROJECT NAME.

Mailing List

Open file “config” and add folowing text, configure to which addresses email will be sent as:

[hooks]        
mailinglist = email1@gmail.com, email2@gmail.com        
showrev = "git show -C %s; echo"        
emailprefix = "[My Git Repo] "

Save the file. If you’re using terminal, you can open the files for editing using nano <filaname> command. When done editing, press Ctrl + x for exit, then press y for saving, press enter to use original file name for saving the file.

Activate Hooks

Now go to “hooks” directory & rename the file post-receive.sample to post-receive:

cd hooks
mv post-receive.sample post-receive

Open the file (“post-receive”) for editing. Uncomment the last line by removing the beginning “#”, then save it.

Set Execute Permission on

Following 2 files should be made executable. I’m showing examples by terminal. If you’re using Filezilla/other file browser, make files “executable”, probably by right clicking on the files and clicking something like permission.

chmod 0755 /usr/share/doc/git-core/contrib/hooks/post-receive-email
chmod 0755 post-receive

That’s it! Now whenever someone pushes to the repo, emails will be sent according to the config file you’ve just edited.

References

http://stackoverflow.com/questions/552360/git-push-email-notification

http://book.git-scm.com/5_git_hooks.html

Note: If the file “/usr/share/doc/git-core/contrib/hooks/post-receive-email” is missing, you can use following file downloading.

http://git.kernel.org/?p=git/git.git;a=blob_plain;f=contrib/hooks/post-receive-email;h=60cbab65d3f8230be3041a13fac2fd9f9b3018d5;hb=HEAD

Create SVN Repository in Ubuntu & Access via HTTP

Requirements:

Assuming, you’ve Apache server installed already.

1. Install SVN

Open a terminal & type:

sudo apt-get install subversion

2. Create Repo

Let’s say, we want to create a repo in /var/svn/myrepo. Type in terminal:

cd /var
sudo mkdir svn
sudo svnadmin create /var/svn/myrepo

3. Users & Groups

Create a user & group named “svn”:

sudo adduser svn

Add user “www-data” to “svn” group:

sudo usermod -a -G svn www-data
sudo chown -R www-data:svn /var/svn/myrepo # Run this twice
sudo chmod -R g+rws /var/svn/myrepo # Run this twice

4.  Configure Apache2

Run in terminal:

sudo apt-get install libapache2-svn

You’ll find a file in /etc/apache2/sites-enabled folder. Let’s say, this file is “000-default” (in most cases) – edit this file by typing:

gksudo gedit /etc/apache2/sites-enabled/000-default

Add following lines in the beginning of the file:

    <Location /svn/myrepo>
      DAV svn
      SVNPath /var/svn/myrepo

      AuthType Basic
      AuthName "Subversion Repository"
      AuthUserFile /etc/apache2/passwords
      Require valid-user

    </Location>

Save the file, then restart apache:

sudo /etc/init.d/apache2 restart

5. Adding Users

Then Add the first user typing:

sudo htpasswd -cb /etc/apache2/passwords user1 password-for-user

# Add more users...

sudo htpasswd -b /etc/apache2/passwords user2 password-for-user

Finally, you’ll be able to access your repo at:

http://<ip-of-your-machine>/svn/myrepo

Instead of <ip-of-your-machine> you can also use your computer’s name.

References:

http://www.subversionary.org/howto/setting-up-a-subversion-server-on-ubuntu-gutsy-gibbon-server

https://help.ubuntu.com/community/Subversion