"; */ ?>


Jan 11

Tomboy on Mac

Tomboy On MacOn “from Ubuntu to Mac” journey I don’t leave my friends behind. Tomboy is such a friend. Plus I already have several hundreds on notes in Tomboy format, so the choice for a note taking app is very obvious here.

To install Tomboy on Mac there are only two things that need to be done:

1. Download Tomboy ( Mac App ): http://projects.gnome.org/tomboy/download.html ( unzip, copy to /Applications )

2. Install “Mono” framework (a .NET framework for *nix systems): http://www.go-mono.com/mono-downloads/download.html

To migrate existing notes ( e.g. *.note ), I had to do a 30 seconds digging. It appears that unlike on Linux, where notes live under “~/.tomboy”, on Mac notes live under:

~/Library/Application Support/Tomboy/

So that is the place to copy all the existing notes to. Once copied, Tomboy is all good to go.

Welcome to my new OS X world Mr. Tomboy!

Nov 10

Install Alternate Ubuntu Image from USB

UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD.

Unfortunately it does not work by default with Alternate Ubuntu Images. In order to make it work:

1. download an alternate image: Ubuntu Alternative Downloads
2. write an image to USB drive using UNetbootin
3. boot from this new USB on the target host
4. select the menu item “Default”
5. DON’T press ENTER
6. press TAB
7. add the “cdrom-detect/try-usb=true” before the “- -”
8. press ENTER

Now it will actually look into USB to install the system rather than looking for CD-ROM or trying the whole OS from the network.

Aug 10

Gitolite: Does Not Appear to be a Git Repository

Have a user, whose public key was successfully added under “gitolite-admin/keydir” and whose rights were successfully configured under “gitolite-admin/conf/gitolite.conf”.

When this very user is cloning an existing, correctly configured repository, his/her identity ( public key ) is not being passed correclty => hence notice a password prompt:

$ git clone git@yourgitserver.com:your-project
Cloning into your-project...
git@yourgitserver.com's password: 
fatal: 'your=project' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

Here is the way to help out git / gitolite to understand which identity ( key ) to use:

$ vi ~/.ssh/config
host gitolite
     user git
     hostname yourgitserver.com
     identityfile ~/.ssh/mypubkey

Now changing “git@yourgitserver.com” to “gitolite” does the trick:

$ git clone gitolite:your-project
Cloning into your-project...
remote: Counting objects: 83, done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 83 (delta 3), reused 0 (delta 0)
Receiving objects: 100% (83/83), 156.45 KiB | 49 KiB/s, done.
Resolving deltas: 100% (3/3), done.

Notice, public key was successfully accepted => hence there was no password prompt, and the clone was successful.

Aug 10

Making Git to Add Empty Directories

Since git is a “content” based SCM, and empty directories by git are not considered to be content [ which is arguable ], the only way to add them is to add “.gitignore” to every empty directory.

That may sound like a weird task after each time you create a Grails / Rails / Spring Roo / … project, since there are going to be many empty directories right from start.

To ease the pain, here is an alias you can add to your “.bashrc” to use before “git add .”:

# add '.gitignore' to all the empty dirs
alias ged='for i in $(find . -type d -regex ``./[^.].*'' -empty); do touch $i"/.gitignore"; done;'

one liner author: justinfrench.com

Aug 10

Connect to Wireless Network at Startup

Assuming WPA/WPA2 security is used, first thing to do is to get a hash/hex of the password. Below “myssid” is the wireless network’s SSID, and “mypassword” is the password for this network.

Step 1 Generate a WPA password hash to be used later when setting up network interfaces:

$ wpa_passphrase myssid
# reading passphrase from stdin

Step 2 Configure a wireless network interface using the password hash from Step 1:

$ vi /etc/network/interfaces
   auto wlan0
   # configuring a static IP
   iface wlan0 inet static
   #  OR if static IP is not needed ignore above 6 lines and uncomment the one below
   #  iface wlan0 inet dhcp   
   # configure WPA/WPA2 security
   wpa-ssid myssid
   wpa-psk 2f0568b3492812bd56b946dbaf3fd7dd669b9a4602a09aa6462ff057949b025c