Two things that I have found really useful when working with Git on a mac:
First autocomplete in terminal. When I started using Git I used the client program Github for mac, but because I found it too buggy i switched to only using the terminal. This also gives you a better understanding of what's going on. But the problem was I could not autocomplete git commands. Luckily this was really simple to add this feature.
Download this script and save it as git-completion.bash
https://github.com/git/git/raw/master/contrib/completion/git-completion.bash
Add the file to your .bash_profile
source ~/git-completion.bash
Then make some shortcut alias in .gitconfig
Remember to restart you terminal (or open a new window).
Another very useful thing is to show you working branch in the prompt. Here you just have to change your PS1 in .bash_profile. There are many ways to do this and some really nice ones are shown here:
http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
I don't see a reason to put the hostname (computername) in the prompt, so after some modification I ended up with this:
export PS1="\[\033[1;33m\]\u\[\033[01;34m\] \w \[\033[31m\]\`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\\\\\*\ \(.+\)$/\(\\\\\\\\\1\)\ /\`\[\033[37m\]$\[\033[00m\] "
I have much joy of the small program called precipitate which allows you to search for and launch different information you have stored in the google cloud from within spotlight. It currently supports the following services:
- Google Bookmars
- Google Docs
Get the program here
After having spent a few hours trying to get an image uploading script to work in php on my mac, I found out that the GD Library is not pre-installed with PHP. Why is that? I thought that the GD lib was a standard module and I know it is installed in the XAMPP package for windows. I have not installed the lib yet, but I found this page which explains a how-to, but by looking at the comments it seems that it is not as simple as it should be. People are really having dififculties getting it to work. I will try to install it when I have some more time and post my result here.
I was pretty exited about the Apple keynote yesterday. One thing that I especially was trilled about was the Time capsule device. I have been running leopard now since it arrived in the stores and I have never enabled Time Machine, even though I really want to. I have a noname NAS box with a 320 GB hard drive and it has given me nothing but trouble. The first thing I tried when I got it was to set up a ftp server. This was supposed to be very simple (but not for a computer engineer…).
After a few hours I got it working and the problem was more of a NAT-wireless-access-point-firewall issue.The box also supports samba. This I was were exited to try and it actually worked. I was able to connect to the harddrive and use it as an external harddrive – on my windows pc…… For somehow it does not work in leopard. By reading a bunch of threads I found out that I was not the only one with the problem. I can see the disk as a shared disk and I can se the folders, but no files in the folders. Some people wrote that it had worked in Tiger, which makes it even more wired. Now I’m thinking that the Leopard team turned that feature off, because they knew about the release of Time Capsule???
Anyway, as Jobs said “wires sucks” – not specific, but that was what he meant, I think Time Capsule is pretty cool. One thing I do not understand, is why they have not build in the functionality to plug it into a Hi-Fi stereo, like the Airport Express Base Station with AirTunes. I like to keep all my music on an external hard drive (and my Ipod), but that means every time I want to listen to music over my stereo, I have to connect (with a cable) to my external hard drive, which is very inconvenient. Jobs announced that the price for a 500 GB Time Capsule would be $300. How can that be 2.299 DKK?? The exchange rate is about 5, meaning it should cost around 1.500 DKK… I think 2.299 is to expensive, so I might just buy an Airport Express Base Station..