Installing Git and gitosis on Ubuntu

June 16, 2008 – 11:10 pm

I’m switching all my personal projects to git from Subversion. To that end, I’ve set up a remote git repository on my Linode.com VPS running Ubuntu. Here’s how to do it:

First, install git on the remote server:

sudo apt-get install git-core

Then, following instructions on scie.nti.st, we grab the gitosis code (still remote):

cd ~/src
git clone git://eagain.net/gitosis.git

Then:

cd gitosis
sudo apt-get install python-setuptools
sudo python setup.py install           # I had to do sudo here
sudo apt-get install python-setuptools # I also needed these tools

Next, create a git user to own the repositories:

sudo adduser \
    --system \
    --shell /bin/sh \
    --gecos 'git version control' \
    --group \
    --disabled-password \
    --home /home/git \
    git

I copied my public ssh key from my workstation to the remote server at /tmp/id_rsa.pub, (tmp avoids perms issues with git) then run

sudo -H -u git gitosis-init < /tmp/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update

And that’s the end of the server-side setup! On the local machine, we check out the files that are needed to control the server.

If you run SSH on a nonstandard port: edit ~/.ssh/config and put this inside:

Host www.example.com
    Port 32767

Then you can do:

git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
cd gitosis-admin

The gitosis-admin is the directory where you administer gitosis. From this point on, you don’t need to be on your server. All configuration takes place locally and you push the changes to your server when you’re ready for them to take effect.

RailsConf Git Talk

June 14, 2008 – 4:44 pm

Scott Chacon’s RailsConf 2008 Talk on Git:

Free Rails 2.1 Book

June 14, 2008 – 4:29 pm

If you’re eager to learn how to use all the new features in Rails 2.1, Carlos Brando just released a free book titled Ruby on Rails 2.1, What’s New?. You can download the PDF in its original Portuguese, or its very recent English translation. This 120 page book covers everything you need to know about Rails 2.1 with many step by step examples.

Ruby on Rails 2.1 What\'s New?

You might also know Carlos Brando from the Ruby on Rails Podcast Brazil he does with Fabio Akita. If you’re a Rails developer and you speak Portuguese, definitely check out their podcast.

RailsConf 2008 David Heinemeier Hansson’s Keynote Video

June 14, 2008 – 4:20 pm

RailsConf 2008 David Heinemeier Hansson’s Keynote Video


RailsConf 2008 David Heinemeier Hansson Keynote from daniel wanja on Vimeo.

Visual Studio 2008 Bug Upgrading web site from Visual Studio 2005: compiler error CS1519

February 23, 2008 – 12:36 am

I recently upgraded a website to Visual Studio 2008 from Visual Studio 2005 so I could make use of LINQ to SQL. Upon adding my table to a new .dbml file and rebuilding, I was met with this nasty compiler error:

LINQ to SQL compiler error CS1519: Invalid token ‘void’ in class, struct, or interface member declaration

After a few minutes of cursing Microsoft, I figured it out…looks like the compiler version wasn’t updated in the solution
file…the C# 2.0 compiler was still being used and choked on the
partial methods. I went into project properties, downgraded from
framework 3.5 to 2.0, clicked ok, then went back and set it to 3.5 and
clicked ok. After re-adding the reference to System.Data.Linq, the
compile succeeded.

To me, this is a bug in Visual Studio
2008…the scenario where you “upgrade” a Visual Studio 2005 website to
2008 for use with LINQ seems like a common thing, no?

Dave Yancey confirms this behavior for XMLSerializer bugs as well…thanks Dave!

Update (May 23, 2008): I was told the following would also be helpful, though I have not tested it yet:

<system.codedom>
<compilers>
<compiler language=“c#;cs;csharp” extension=“.cs” warningLevel=“4″
  type=“Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″>
<providerOption name=“CompilerVersion” value=“v3.5″/>
<providerOption name=“WarnAsError” value=“false”/>
</compiler>
<compiler language=“vb;vbs;visualbasic;vbscript” extension=“.vb” warningLevel=“4″
  type=“Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″>
<providerOption name=“CompilerVersion” value=“v3.5″/>
<providerOption name=“OptionInfer” value=“true”/>
<providerOption name=“WarnAsError” value=“false”/>
</compiler>
</compilers>
</system.codedom>

Which will kill SOA fastest: no money or no skills?

February 1, 2008 – 9:35 am

Which will kill SOA fastest: no money or no skills? by ZDNet's Joe McKendrick — Double trouble for SOA in 2008?

Which one of the following will kill SOA projects faster this year?

Lack of money, or

Lack of skills?

Two separate articles out this week talk about double-trouble for SOA in 2008.

Anne Thomas Manes, analyst with Burton Group, is warning that a potential downturn in the economy could pull the rug out from under many SOA projects. According to a report in SearchSOA, Anne warned that “You’re going to see budgets shrink. You’re going to be asked to do more with less. One of the most dangerous things is we’re going to see funding for major initiatives evaporate.” In addition to corporate budget cuts, there will be other pressures on IT, such as as globalization, outsourcing and auditing required by new federal government regulations. (Which will usurp talent away from SOA efforts.)

Economists are divided as to whether an actual recession is coming, or if we’re in for a period of slower growth. But, as I’ve mentioned in previous posts, IT budgets have been mean and lean for years, so IT managers already how to get around further tightening.

IBM’s Sandy Carter sees a different kind of threat — there aren’t enough people with the right skills to see SOA projects through. IBM recently released the results of its survey of Fortune 1000 executives conducted at last year’s Impact event, and found skills to be wanting. “We’ve definitely found from our customers there is a shortage of SOA skills across the board, not just in IT,” she is quoted as saying. “The SOA skills shortage is really across the entire SOA lifecycle, and includes architects, business, risk management and other professionals that can help companies apply SOA to transforming their business.”

If there is a downturn in IT budgets, at least these SOA professionals will have high value to the business, and thus some job security.

So when you put these two worries — budget cuts and skills shortages — together, you get some very busy and overstressed IT shops. We may find that IT and SOA professionals will continue to be asked to do more and more with less and less, without additional staff resources. (To greatly paraphrase Winston Churchill, never before have so few been asked to do so much.)

As a result, we will see an ongoing juggling act (with more knives and torches thrown in), and some projects will get dropped to the floor. Some SOA projects — even those that don’t cost too much — may simply be relegated to the bottom of the priority list because of lack of time, and lack of perceived urgency. But this inability to adequately staff and fund SOA projects is something we’d see even in a booming economy.

Whether you’re facing the budget axe, or you can’t find people who know SOA, the solution is the same. Anne recommends downshifting SOA to small, incremental steps — “think big, take small steps” is Burton’s mantra.

IBM’s approach to managing SOA with small staffs is almost identical: “You don’t start to try with a huge project. You start with a small project,” Sandy says. “But we also tell them, ‘Start with a big vision. Set a vision that is larger and broader than the scope of the project you chose.’”

I’m a WS-I Advocate!

November 9, 2007 – 2:47 am

I am proud to be an Advocate of the Web Services Interoperability Organization (WS-I). WS-I is an open industry consortium chartered to facilitate Web services interoperability and to accelerate Web services adoption in the marketplace. For more information: http://www.ws-i.org

WS-I Advocate

My Cats Stalking a Bird

September 30, 2007 – 11:35 pm

Generating Random Names as Test Data

September 26, 2007 – 1:05 am

Ever need to generate thousands of names to use as test data?

I just created an Excel sheet that uses the 1990 US census data to generate random male and female names.

Columns:
A: Male First Name
B: Female First Name
C: Last Name
E: Male Full Name (Proper Case)
F: Female Full (Proper Case)

Columns A,B,C are ordered by descending popularity. It’s limited to 65,536 names (an Excel limitation), but this should work for seeding names in just about any database you’ll need.

I’ve also verified this to work in OpenOffice.org Spreadsheet 2.4.

DOWNLOAD HERE

Adding ASP.NET AJAX to Existing Websites

September 22, 2007 – 8:27 am

If you want to add Microsoft ASP.NET 2.0 AJAX Extensions 1.0 to an existing website…

Click here for the video! 

First, install the ASP.NET AJAX 1.0 Extensions: ASP.NET 2.0 AJAX Extensions 1.0

Next, add some stuff to the web.config file:

In the system.web section add the following line:

    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </controls>
    </pages>

This will save you having to have the following directive at the top of each page:

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

If you find you are getting the nasty "'Sys' is undefined error on your pages, putting the following into the System.Web section will fix this:

    <httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>

    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>

Thats it!  All you should need to do now is just drop a script manager and update panel on the page and throw the controls you want to AJAX-enable in them and you are locked and loaded.

Thanks to Darryl Burling for the tip!